use jai convert jpeg to tiff group3 t.4

View: New views
3 Messages — Rating Filter:   Alert me  

use jai convert jpeg to tiff group3 t.4

by jai-interest-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I used jai convert jpeg to tiff for fax.but the fax is not support the  tiff image,now I can not find the wrong with my code,please help me.and show your code.my code is

ParameterBlockJAI   loadPB   =   new   ParameterBlockJAI("fileload");  
        loadPB.setParameter("filename","D:/myDoc.jpg");  
                PlanarImage s = JAI.create("fileload", loadPB);
                Image img = s.getAsBufferedImage();
                RenderedOp source = JAI.create("AWTImage",img );
                source = JAI.create("Invert", source, null);
                BufferedImage image = source.getAsBufferedImage();
                BufferedImage outputImage=new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_BYTE_BINARY);
                outputImage.createGraphics().drawImage(image, 0, 0, null);
                TIFFEncodeParam param = new TIFFEncodeParam();
                param.setCompression(TIFFEncodeParam.COMPRESSION_GROUP3_2D);
                File of = new File("D:/9.TIF");
                OutputStream stream = new FileOutputStream(of);
                TIFFImageEncoder encoder = (TIFFImageEncoder) TIFFCodec.createImageEncoder("tiff", stream, param);
                encoder.encode(outputImage);
[Message sent by forum member 'honby1983' (honby1983)]

http://forums.java.net/jive/thread.jspa?messageID=297942

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: use jai convert jpeg to tiff group3 t.4

by jai-interest-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had solved the problem.
[Message sent by forum member 'honby1983' (honby1983)]

http://forums.java.net/jive/thread.jspa?messageID=298542

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: use jai convert jpeg to tiff group3 t.4

by jai-interest-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How did you solve the problem? What was incorrect in your code?
[Message sent by forum member 'aspire_2009' (sbparameshwar@...)]

http://forums.java.net/jive/thread.jspa?messageID=363615

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...