Re: NSBMPFileType and resolution setting
Re: NSBMPFileType and resolution setting
- Subject: Re: NSBMPFileType and resolution setting
- From: Heinrich Giesen <email@hidden>
- Date: Tue, 25 Oct 2005 09:32:46 +0200
Prady K wrote:
I have this piece of code that is used to save a image in different
formats with a given resolution. It works fine for all formats except
for the BMP format (NSBMPFileType). For this case it always sets the
resolution to 72dpi.
This is a Cocoa bug. Whatever size you set, NSBitmapImageRep
always sets the BMP fields xPelsPerMeter and yPelsPerMeter to
2835 pixel per meter which is 2835*0.0254 = 72 pixel per inch.
When reading NSBitmapImageRep always uses 72 pixel per inch
without looking at the resolution values stored in the BMP file.
Any ideas why it is not setting the resolution for the BMP file type?
Also is there a workaround for this?
I started writing a workaround which is not well tested.
If you want I can send it in a private mail.
--
Heinrich Giesen
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden