Image Conversion


Ive followed the best practice to convert images from jpg/jpeg to PNG by manually converting image on my Mac machine and using java library (Java 8 ImageIO and iCafe) to convert an image. It turned out that two method gave me two different result even though it looked the same by looking at the properties

1. Export image as PNG 

2. convert image by using iCafe. I set the parameters as the following 

ImageIO.write(img, fo, imageType, builder.quantMethod(QuantMethod.WU_QUANT) .colorType(ImageColorType.INDEXED) .applyDither(true) .ditherMethod(DitherMethod.FLOYD_STEINBERG) .hasAlpha(true).build());

I'm running out of ideas now. I'm wondering if you technical team suggests me which library I can use to convert images.







1 comment

  • Avatar
    Oksana Serdyuk

    Hi Tommy,

    Could you please describe your goal, what is your usage scenario? Because now it is not clear why you need to convert the images from one image format to another before OCR. Actually, any such conversions do not allow you to improve the image quality, if the source image quality is poor. Our best practices tips describe how to scan or photo different types of documents for various scenarios.

    Also you can send some of your images to for our testing.


    Comment actions Permalink

Please sign in to leave a comment.