I ' mtryingtoconvertabitmapimageintoanuncompressedtiffileforusewiththetesseractocrengine。
icanusethismethodtoproduceacompressedtiffile .
finalbufferedimagebmp=imageio.read (new file (' input.BMP ' );
imageio.write(BMP,' jpg ',newfile ) ) output.TIF );
thisproducesanemptytiffilewhenthe ' jpg ' ischangedtotifasthesefilesaredealtwithinjavaaadvancedimaging (jai )。
howcanicreateanuncompressedtifimage? shouldidecompressthetifimageproducedfromtheabovecodeoristhereanotherwaytohandletheconversionprocess?
anyexamplesprovidedwouldbemuchappreciated。
kingh32
youcanuseimagewriteparamtodisablecompression :
tiffimagewriterspispi=newtiffimagewriterspi (;
param.setcompressionmode (imagewriteparam.mode _ disabled;
writer.setoutput(IOs;
writer.write(null,newiioimage ) BMP,null,null ),param );