• 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: NSImage resizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage resizing


  • Subject: Re: NSImage resizing
  • From: Heinrich Giesen <email@hidden>
  • Date: Thu, 15 Jan 2009 10:52:34 +0100

Hi,

On 15.01.2009, at 09:31, Parimal Das wrote:

i am getting the following output error-

2009-01-15 13:43:09.313 te[747:10b] NSImage 0x117340 Size={32, 32} Reps=(
NSIconRefBitmapImageRep 0x117e30 Size={128, 128} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=128x128 Alpha=YES Planar=NO Format=0,
NSIconRefBitmapImageRep 0x11cdd0 Size={48, 48} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=48x48 Alpha=YES Planar=NO Format=0,
NSIconRefBitmapImageRep 0x118280 Size={32, 32} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=32x32 Alpha=YES Planar=NO Format=0,
NSIconRefBitmapImageRep 0x11ce80 Size={16, 16} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=16x16 Alpha=YES Planar=NO Format=0
)
2009-01-15 13:43:09.314 te[747:10b] OK1


2009-01-15 13:43:09.315 te[747:10b] NSIconRefBitmapImageRep 0x117e30 Size={384, 384} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=128x128 Alpha=YES Planar=NO Format=0

Segmentation fault
-----> program exited
this segmentation fault is coming just before the image writing step (notice check 3 is not coming).
ie program is crashing before the step
[[bitmapImageRep2 representationUsingType:NSJPEGFileType properties:nil]
writeToFile:destPath
atomically:YES];




I tested my code in Tiger and in Leopard and it works well in both systems.
My guess is, that the Segmentation fault is due to an invalid (over released?) destPath.
The debugger may tell you more about the bug.


i am really clueless about why it is happening ???? also there is a big difference between general NSImage and what i am getting in myIcon (see its a mixture of 4 images as in the .icn files)


No, it's ok. The NSImage is a container of zero, one or more NSImageReps. It's typical for
icon images to have several representaions of different pixelsizes.


Greetings
   Heinrich


-- Heinrich Giesen email@hidden


_______________________________________________

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: 
 >Re: NSImage resizing (From: Heinrich Giesen <email@hidden>)
 >Re: NSImage resizing (From: "Parimal Das" <email@hidden>)

  • Prev by Date: Using an NSOpenGLVIew to play a Quartz composition with QCRenderer
  • Next by Date: Filtering NSPopUpButtonCell when clicking on it
  • Previous by thread: Re: NSImage resizing
  • Next by thread: A Question on estimating +arrayWithCapacity
  • Index(es):
    • Date
    • Thread