Difference between GIMP Indexed color mode and Imagemagick -colors or -remap

My task is to reduce size of scanned text document into .png with acceptable quality loss. My procedure consist of those steps: Raw images are scanned in tif format and processed by ScanTailor (automatic tool for cutting double pages, fixing a tilt, cropping and converting to grayscale). Batch proccesing by ImageMagick: convert in.png -resize 2000X2000 … Read more

How to recreate an image from a HTTP POST request sent to a input stream in Java?

A simple Java web server (manual HTTP protocol implementation, we’re dealing with sockets here) serves an HTML form, the client uploads an image (PNG) through the web browser. This creates a POST request which is parsed by the server. The HTTP request looks something like this after some initial headers has been excluded: Content-Type: multipart/form-data; … Read more