Creating a JPEG file greater than 96dpi
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Lee_Templeton
Posted On:   Sunday, June 22, 2003 10:59 AM

I've done some research and found that I may write out a TIFF file with a dpi greater than 96 by using the JAI and writing out extra params to the metadata with the following lines of code: ----------------------------------------------- TIFFEncodeParam currentPageParam = new TIFFEncodeParam(); TIFFField[] extras = new TIFFField[3]; extras[0] = new TIFFField(282, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)204, (long)1},{(long)0 ,(long)0}}); extras[1] = new TIFFField(283, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)196, (long)1},{(long)0 ,(long)0}}); extras[2] = new TIFFField(296, TIFFField.TIFF_SHORT, 1,(Object) n   More>>

I've done some research and found that I may write out a

TIFF file with a dpi greater than 96 by using the JAI and

writing out extra params to the metadata with the

following lines of code:

-----------------------------------------------

TIFFEncodeParam currentPageParam = new TIFFEncodeParam();



TIFFField[] extras = new TIFFField[3];

extras[0] = new TIFFField(282, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)204, (long)1},{(long)0 ,(long)0}});

extras[1] = new TIFFField(283, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)196, (long)1},{(long)0 ,(long)0}});

extras[2] = new TIFFField(296, TIFFField.TIFF_SHORT, 1,(Object) new char[] {2});



currentPageParam.setExtraFields(extras);

-----------------------------------------------

However, I am needing to write out a jpeg file and not a

tiff file. Does anyone know how I can change the jpeg's

metadata to be able to write out a jpg file with a dpi

greater than 96?



Thanx,



Lee

   <<Less

Re: Creating a JPEG file greater than 96dpi

Posted By:   Zac_Jacobson  
Posted On:   Monday, June 23, 2003 10:23 AM

Please don't post the same question more than once.
About | Sitemap | Contact