Remove white square around a png image - iphone

I have a png image of a pin. I add it as a subview onto another imageview. But when I add it I see a white square around the pin itself. How can I remove that white background. I can see that white square when I view the file in Preview application.
P.S. The platform is Mac OS X Snow Leopard. I'm developing an app for iPhone.I downloaded a png image from internet.

open that image with photoshop then select layers and then u will see two layer one for your pin other for backgroundlayer.right click then delete backgroundlayer then save again.ur problem solved.
do with Layer window pan in photoshop

Related

PNG file looks completely different inside of Unity

I purchased the "Set Builder: Back street Manhattan" with came with some png textures such as this one.
When I open the file in the browser or any editing program, it looks completely transparent except for the windows. When I drag the image into Unity, it is completely opaque bricks (which is what I want) If I duplicate the image and drag that image into Unity, it is again completely opaque bricks. If I save a copy of the image with photoshop or another application, the information that contained the bricks is lost and it is now mostly transparent, except it has some blotchy white textures which also aren't seen in the photoshop interpretation. Every texture in this folder is doing this same behavior. Are these files corrupted or compressed? How do I retain the brick information into an image editing program besides taking a screenshot within Unity ? Here is an example : of dragging images onto cubes in Unity. Left is a Photoshop copy. Right is attached image
The developer has not replied to my direct questions.
it can be your texture import format
try changing its format to true color
I found a solution in Photoshop.
Layer>layer mask>from transparency. Then right click on the layer to disable the transparency.

How to display a pixel art image in Xcode 7 without it anti-Aliasing

I'm new to Xcode so please be patient with me! :)
(using Swift 2.1, OSX 10.11.2 El Capitan and Xcode 7.2 I am not using sprite kit or anything like that, I'm just using a single page application)
I'm trying to make a pixel art game but whenever I create a UIImageView and set the image to my pixel art png file, it makes the image all blurry, here is a screenshot of it:
as you can see in the Preview window (right) the image is crisp and clean, and in the Xcode window (left) the image is blurry and fuzzy
Can someone please tell me how to fix this?
In swift 5 you can do the following to change the filtering mode:
texture?.filteringMode = SKTextureFilteringMode.nearest
This will disable anti-aliasing for the selected texture.
This should not be an issue.
Check the view mode of the Image. Try setting it to center.
You can also turn off the PNG Compression. How can I skip compressing one PNG?.
It is possible that the alpha channel is messing it up so try saving as a 24 bit PNG no Alpha or even better 8bit PNG no Alpha.

iphone large icon 512x512 with border glitch?

I just uploaded my first iPhone app. The app icon has a border, sort of like the "settings" icon. However, when I upload my large icon in iTunes connect, there are some weird white edges in the corners. It appears that they might use a smaller corner radius or something. How can I make sure it will display correctly on the apple store?
The image is a jpeg with no transparency.
Thanks for the help!
What's happening is the appstore is expecting a purely square 512x512 image. It then masks it to have rounded corners and then adds a drop shadow automatically.
If you want it to have a specific border like what you've designed you need to match their rounding exactly.
If you search around. there are PSD templates available that will help you design it (i.e. they have the exact mask that itunes uses).
Here's an example: http://www.pixelresort.com/blog/app-icon-template/
Another technique which can work really well is leaving the outer part of the icon square — in your case, the dark brown outer border would extend to the edge of the canvas – and let the roundrect mask handle the corners for you. There's a bit more info in this excellent blog post: All the sizes of iOS app icons
You'd still get the border effect, but let it be cut cleanly by the mask rather than by your icon's transparency.
I believe this to be a bug with iTunes Connect. I've seen the same problem, but it only appears on the Versions summary screen.
I've seen this when uploading a square icon. For example:
In summary, don't worry about it. Your icon should still show up correctly in the iTunes Store and on the Devices themselves. If your icon looked clean in the iOS Simulator and on your device, you're good to go.

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.

Interface Builder vs. What's Displayed on iPhone

Hello and thanks for giving this question a gander.
It seems that PNG files that I drag/drop into IB do not display in the same manner that they are shown in the iPhone simulator. What gives? For example, if I want to drop in a PNG with rounded corners, IB shows hard rectangular corners but when I build to the simulator, I see the rounded edges.
I don't understand the purpose of IB for UI if I can't accurately reflect what will be shown for that view.
Can you verify that the PNG files are saved with a pixel density of 72dpi? Also, what type of UI element are you using? (UIButton, UIImageView, etc). It would help if you could post a sample image.