How can I upload an icon for my app on facebook with out the black grainy borders? - facebook

I have a logo and when I upload it to facebook it has a black border around it. I think this is because it has a transparent background and has a shadow. Is there anyway to fix this?

Facebook doesn't support transparent images and coverts everything to a JPG file. Save your file as a JPG (using an appropriate background color) and then try to upload it.

This works perfectly, but it will apply a near all white background to your icon.
In Sketch:
Add a white (#ffffff) background filled layer to your design
Set the Height and Width of the layer to 1023.5
Position the layer on the X and Y at 0.5
This will bypass facebook's transparency limitation, and the space around the image is so small you can't see the border that facebook applies to the image.
Result

Related

App page being rejected by FB

I am trying to create a page for an app on Facebook. But it is being rejected (for the fourth time) for this reason:
Your icon image should be on a colored or transparent background. Do not use white frames on your icons. Use colored frames to enclose your icon if your icon has white space.
I've followed the guidelines and tried different alternatives. The icon being rejected (in the fourth try) can be found under the following link: http://funryde.com/img/funryde_icon.png. I don't know what it is being missed here. Your help is appreciated.
Thanks
Your gradient background will be mistaken for plain white by Facebook's system. You will need to add a border around the image (e.g. Photoshop, select all > blending options > inner stroke) OR change your background to a solid colour.

transparent color to white for an UIImage

I realised that all my png images are defined with a transparent color instead of white color. I never noticed because the background of my app was white but now is of a different color. And as I cannot edit each single png file to replace the transparent color to white, I am looking for a simple programmatic way of replacing on the fly the transparent color by a white color. How should I do this please?
Thanks for any help
Cheers,
geebee
If I understand what you're trying to do, I would suggest you add a white background to your UIImageViews.
self.myImageView.backgroundColor = [UIColor whiteColor];
I don't see why you can't just "edit each single png file"; it's a pretty much instant batch operation using GraphicConverter or ImageMagick or whatever.
If you really insist on compensating for this on the device when the image loads, then just draw the image onto a white opaque rectangle and use the resulting composite image.

How to know the background color of Pdf

Sometimes pdf might have a transparent background. And In my application I have given a option to choose background. So, in case of pdf with transparent background and background color black all things becomes black black so, any way to check or any key inside dictionary of pdf page that can help me? Any help will appreciated.
The easiest solution for you would be to remove black color from available background colors.
Generally, all pdf pages have transparent background and the white background color is set by the viewer application. It is possible to set a background color for each page. You can read all about it in Page Group under Transparency section of the PDF Reference.
It is also possible to show a background color for a page by setting 'BoxColorInfo' dictionary in the page dictionary with appropriate values.
But I am not sure what you can achieve by knowing what color a page background is, since black background is going to be a problem for PDFs with transparent pages anyways.
EDIT: Following is the paragraph from PDFReference i was trying to point you to:
Ordinarily, the page is imposed directly on an output medium, such as
paper or a display screen. The page group is treated as an isolated
group, whose results are then composited with a backdrop color
appropriate for the medium. The backdrop is nominally white, although
varying according to the actual properties of the medium. However,
some applications may choose to provide a different backdrop, such as
a checkerboard or grid to aid in visualizing the effects of
transparency in the artwork.
It says that most PDFs would have a transparent and it is your application which shows the background color. Hope this helps.

Opacity of image in IB is not correct

semi-transparent images that I added to my resources. When viewed in interface builder it doesn't show as transparent as it did when I had it in Photoshop. I made sure that the opacity was the way I wanted it and the background was transparent pixels. I even tried saving the image as PNG-24 preset and checked the transparency box in PS mobile and web. And in interface builder I made sure that the opaque box in view attributes was unchecked. But after all this the image doesn't display with the proper opacity as I set it as.
You need to save it as PNG-32, 24 Bits (3*8) is just RGB, so it doesn't have an alpha channel.

Convert an image to an iPhone toolbar icon

I have a grayscale icon that I'm editing with Photoshop with a transparent background, but I can't, for the life of me, figure out how to convert the icon to one that can be used as an iPhone toolbar icon. If I simply save the image as a PNG, it doesn't show up as anti-aliased on the iPhone because every pixel with color is being rendered as black, instead of a shade of gray.
According to the Apple docs and other sources, there needs to be an alpha channel on the image to specify varying levels of transparency for each pixel. However, I have no idea what that means. I've read these posts and docs from Adobe and I still can't figure out how to properly convert a grayscale image into one that can be used as an iPhone toolbar icon. The blog post is hard to comprehend and poorly written, and the Adobe docs don't really help.
http://cahit.hayalet.net/blog/514/converting-an-image-to-iphone-toolbar-icon/
http://livedocs.adobe.com/en_US/Photoshop/10.0/help.html?content=WS74B356C9-353F-4483-8632-7B1A102F2A2E.html
Can someone point me in the right direction or provide exact, step-by-step directions to doing this in Photoshop?
It's much more simple than having to muck with actual masks in Photoshop.
iPhone toolbar icons are about 30px by 30px, so make a new Photoshop file with those dimensions. Ensure the background is transparent (you can specify that when creating a new file).
Then, any pixels you draw on top of this transparency become what iOS uses for the icon. Doesn't matter what color it is in Photoshop for NSToolbar icons -- they're automatically used as masks by iOS.
Leave transparent the parts you want to show through. Save as 24-bit PNG, and chuck into XCode as usual.
For a few icons that serve as good starting examples, check out the ones I publish for free here: http://glyphish.com Just take one of the PNGs and open it in Photoshop and you'll see that it's drawn in an arbitrary color (#444444) with varying levels of opacity to create darker and lighter parts of the icon.
This is more of a photoshop question than coding but anyway, here's a suggestion.
Lunacore has a good tutorial on how to use masks.
What you want to do is:
Make sure you're background is transparent.
Create a new layer and
fill it with any solid color.
Create a mask on the solid color
layer, and fill your greyscale image into the mask. (Use your
greyscale image as the mask.)
Toolbar icons use your image as a mask. They only consider what transparancy the image has. Not what color or shade.