• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trying to write icon data to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to write icon data to file


  • Subject: Re: Trying to write icon data to file
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Fri, 13 Mar 2009 08:12:19 -0700


On Mar 13, 2009, at 7:57 AM, Kevin Walzer wrote:

I'm putting together some code that will write an icon file (obtained via NSWorkspace) to a gif.

I had prototyped the code with a simple command-line tool with hard- coded values for file sources, destinations, and image sizes. However, when I try to abstract the code, I am now getting weird error messages:

<Error>: CGImageCreate: invalid image size: 0 x 0.
2009-03-13 10:40:48.805 Wish[20760:10b] Could not create CGImageRef - w:0, h:0, bps:8, bpp:32, bpr:512, alpha:0x1, cSpace:NSCalibratedRGBColorSpace, hasAlpha:1, isPlanar:0

Log your width and height values to see what they really are. You appear to be using 0, 0. Incidentally, setPixelsWide: and setPixelsHigh: do not do what you appear to think they do. You could also check [icon isValid] to make sure the image is available.


objc[20760]: FREED(id): message release sent to freed object=0x466430

This is because you are incorrectly managing memory for icon and resizeicon. Check the docs on that again.



-- Adam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Trying to write icon data to file (From: Kevin Walzer <email@hidden>)

  • Prev by Date: Re: Performance problem with GC enabled
  • Next by Date: NSButton manual drawing
  • Previous by thread: Trying to write icon data to file
  • Next by thread: NSButton manual drawing
  • Index(es):
    • Date
    • Thread