Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JPEG 2000 as media sample?




On Sep 9, 2006, at 5:43 PM, Glenn Anderson wrote:

At 3:30 pm -0700 9/9/2006, James W. Walker wrote:
I have some code that takes JPEG images and makes a slide show movie. In an attempt to make the movie smaller, I tried converting each image to .jp2 format before adding it as a sample.

Does that actually make things smaller?

It depends on what I pass to GraphicsExportSetTargetDataSize. Of course I could have used that to recompress plain JPEG more tightly...


I got a movie that was all black. As a test, I used the same methods to convert to .png before adding each image as a sample, and that worked (though of course the movie was bigger). Are there only certain formats that can be used as samples in a movie?

How exactly are you using the files as samples? While a JPEG image file happens to be the same format as a JPEG sample in a QuickTime movie, that isn't true of all file formats that QuickTime can import. Instead the image importer can do things like parse headers and turn them in to relevant QuickTime meta data, and then for the sample just reference the part of the file that contains the image data, minus the headers. If you just stuff the whole file in as a sample in a case like that, then it won't work. You need to feed the image file to an image importer, and then get the data with functions like GraphicsImportGetImageDescription, GraphicsImportGetDataOffsetAndSize, and GraphicsImportReadData.

Oh, thanks! GraphicsImportGetDataOffsetAndSize was what I needed, now my code works. And if I force enough compression, then JPEG2000 does look better than plain JPEG.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden


This email sent to email@hidden
References: 
 >JPEG 2000 as media sample? (From: "James W. Walker" <email@hidden>)
 >Re: JPEG 2000 as media sample? (From: Glenn Anderson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.