Re: JPEG and 72 dpi revisited...
Re: JPEG and 72 dpi revisited...
- Subject: Re: JPEG and 72 dpi revisited...
- From: Dustin Voss <email@hidden>
- Date: Sat, 6 Sep 2003 13:27:14 -0700
On Saturday, September 6, 2003, at 05:06 AM, Nick Morris wrote:
Hi,
Cocoa interaction with Quicktime (and also Cocoa and NSImage) seems to
be in a real mess.
NSImage does not allow a way of setting the dpi of an image when
saving as a jpeg. The result is an image of 72 dpi not matter what the
dpi of the imported jpeg was. I can see how to access the size and
pixelHeight values to determine the dpi. I can change the values to
effectively change the dpi. However, when the file is saved as a jpeg
these changes are lost as we get 72 dpi. (This all seems to work if
the file is saved as a tiff but I need a jpeg.).
I have tried looking at QuickTime and Carbon for a solution, but I
find the documentation confusing in the extreme.
I am very surprised that it is not easier to do these tasks in Cocoa,
or to have the jpeg export from NSImage not override the original
settings.
It is interesting to note that this is a re-occurring
discussion/question on this, and other, Cocoa related lists. I wonder
if there will ever be an easy way to get Cocoa and QuickTime to play?
If the last 48 hours of Carbon and QuickTime have taught me anything
it is to appreciate the delights of programming in Cocoa and the
short-comings of NSImage.
(I am not really expecting a solution/suggestion to solve this problem
as this is more of a rant than anything. I have submitted some
comments to Apple on this subject.)
Thanks
Nick
Allow me to co-rant. I've never really trusted NSImage. It seems
flakey. I've heard it doesn't work well with 1-bit images, the
proportional scaling doesn't work like you'd expect, and indexed color
mode has problems. Plus, I don't trust that it can auto-detect all the
formats it claims to. I mean, how could it know? Sure, it's great to
have a format-independent wrapper for images, but it seems like
everyone's run into problems with it.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.