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: java.awt.Image -> .mov



something like this would work, though it uses the JPEG sun classes - you
can do something similar with QT, but this is pretty straight forward, if
you don't mind your image data being compressed as jpeg :

BufferedImage bi = ...

ByteArrayOutputStream bos = new ByteArrayOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(bos);
JPEGEncodeParam jpegParams = encoder.getDefaultJPEGEncodeParam(bi);
jpegParams.setQuality(1.0F, false); // Set quality to 100% for JPEG
encoder.encode(bi);
byte[] dataBytes=bos.toByteArray();
QTHandle handle = new QTHandle(data);

once you have the handle you can make a mov easy enough,

rf


> Greetings,
>
> I'm just getting started with QT for Java.
>
> Could someone provide me a code snippet which
> would show how to insert a java.awt.Image into a
> Movie and then save it as a .mov?
>
> I'm just looking to insert a single frame at this point...
>
> Thanks!
>
> Drew
admin requests to the list. They will be ignored.


References: 
 >java.awt.Image -> .mov (From: "Drew Lane" <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.