Problem with JPEGDecoder class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everybody,
I've a problem using your JPEGDecoder class and I hope someone would help me.

I imported in my Project
classpath-0.96.1/gnu/javax/imageio/jpeg/IIOInputStream.java and all
classpath-0.96.1/gnu/javax/imageio/jpeg/* files.

When I try to open a jpeg image in order to decode it, an "Unsupported
JFIF version" exception.
I tried with 25 images but I can't decode anything. When i type file
filename.jpg in a linux console, it says to me "JFIF 1.0".

How can I solve this problem?

I report my code, so you can see if i make a mistake:

        String filename = "myFile.jpg";
        File file = new File(filename);

        JPEGDecoder dec = null;

        FileInputStream in = null;
        try {
        FileImageInputStream fiis = new FileImageInputStream(file);
        in = new FileInputStream(file);
        dec = new JPEGDecoder(fiis);
        } catch (FileNotFoundException e1) {
        e1.printStackTrace();
        }
        catch (Exception e) {
        e.printStackTrace();
        }


Thanks a lot,
Alessandro
idleman86@xxxxxxxxx


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux