Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Import PNG with transparency

edited December 2012 in Questions Posts: 9

Hi! I have imported a transparent PNG from my Photo gallery using sprite(name) but I'm getting a white background covering the extents of the image. I know that this image has transparency, as importing it into Photoshop yields a transparent background as expected. What am I doing wrong?

Comments

  • Okay, pasting it from the Gallery,rather than importing it seems to respect the transparency. Why does the straight import not work?

  • SimeonSimeon Admin Mod
    Posts: 5,417

    The iOS photo picker deletes transparency — unfortunately, there is nothing we can do about this. If you want to get your files in with everything preserved, it's probably best to use Dropbox to get your sprites in.

  • Jmv38Jmv38 Mod
    Posts: 3,297

    You can do it by code too if:
    1- you put the image at a web adress (in picasa for instance).
    2- you read it with httpaccess().
    3- you use the save image function.

  • Thanks, guys, for the information. I will probably be posting a lot in the next while until I get up to speed, and I appreciate everyone's help! I am finding the documentation really sparse and access to resources is quite obfuscated. And not very SEO-friendly either, it turns out: typing "Codea wiki" into Google only yields the wiki as the 6th or 7th result! (Below some article disparaging Codea, even!) Have you considered setting up a proper MediaWiki somewhere? I'm sure the community would pitch in to populate with great content.

  • Jmv38Jmv38 Mod
    edited December 2012 Posts: 3,297

    We just had a discussion about forum search. The best solution at the moment is :
    typing site:www.twolivesleft.com after your search term in Google will restrict the results to only those from the twolivesleft domain

  • Posts: 1,255

    I'm not sure why other folks are having trouble with images that pass through the photo library, but I do this all the time without losing transparency info, I generally edit images using desktop tools, then email them to myself. I download the emails to photo library, and import them to documents. No problem with transparency,

    Images downloaded to photos from the web also work fine.

  • Jmv38Jmv38 Mod
    Posts: 3,297

    .@Mark that's surprising. I loose transparency too when the ios camera roll is in the path...

  • Posts: 1,255

    One thing to note: if in Safari you "save image" inside an email (in gmail or any other web-based email I've tried) you lose transparency. If, however, you open the image and then save image, transparency is maintained. I don't know why it makes a difference, but it does.

  • Posts: 1,255

    Here's a good example on a web site, if you go to this page

    http://www.iconarchive.com/show/animal-icons-by-martin-berube/horse-icon.html

    Touch the horse icon, and "save image," it will be saved without transparency.

    However, if you select the 128x128 file, you'll go to this page.

    http://icons.iconarchive.com/icons/martin-berube/animal/128/horse-icon.png

    Save image from here, and transparency is maintained.

    I've never seen transparency lost in the photo picker, so long as it gets downloaded from Safari with transparency intact.

  • Jmv38Jmv38 Mod
    Posts: 3,297

    .@Mark you are right.

  • SimeonSimeon Admin Mod
    Posts: 5,417

    .@Mark you are right. I was thinking about when you sync photos from your iPhoto library to the device, it destroys the transparency information.

Sign In or Register to comment.