reading image , it always is cut off

N

novel

Hi,

i wrote a program to scale down images. But to begin with i wanted to
test the gifs. I read it from my harddisk and save it on an other
name. But the images are cut off. The end is white. I tried 5 gifs and
always they are cut off at the end. But always on an other position.

Examle:

Image1 (read) Image2 (write)

XXAXXAXAX XXAXXAXAX
XAXAXAXAX XAXAXAXAX
XAXAXAAXX XAXAXAAXX
XAXAXAAXX XAXAXAAXX
AXAXXAXAX AXAXXAXAX
AXXAXAXXX
AXXARRFEA

Code:

Image img = java.awt.Toolkit.getDefaultToolkit().createImage("test.gif");
OutputStream output = new BufferedOutputStream(new
FileOutputStream("test2.gif"));
GifEncoder encoder = new GifEncoder(img,output);
encoder.encode();

Thanks

novel
 
N

novel

Thanks,

but could you write a short mediaTracker code example.

I don´t know how I have to use the mediatracker.

Greetings

novel
 
D

David Postill

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(e-mail address removed) (novel)
wrote:

| Thanks,
|
| but could you write a short mediaTracker code example.
|
| I don´t know how I have to use the mediatracker.

<http://java.sun.com/docs/books/tutorial/uiswing/painting/improvingImageAnim.html>

<davidp />

- --
David Postill

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3 - not licensed for commercial use: www.pgp.com
Comment: Get key from pgpkeys.mit.edu:11370

iQA/AwUBP9O0HHxp7q1nhFwUEQLgBgCfXMN+a9y5FXBEtW7HfU/bmu7hQqAAmgLE
3tL8yX+7/Jp6knum6H2BW5JP
=R8uK
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top