Frage

I'm using + for generating thumbnails in my web application. Unfortunately as I can see, while processing pictures taken with photo cameras, the thumbnails contains all original data such color profile, aperture, camera's manufacturer/model etc. In other words much more things than required for displaying just simple thumbnail on the page. Of course it causes large thumbnail's file size. The thumbnail for the same photo which was saved for the web from any graphic editor is much smaller.

How can I get rid of unwanted data with im4java before further processing?

War es hilfreich?

Lösung

Problem solved, following this GM gist:

mogrify +profile '*' -define jpeg:preserve-settings

I managed the problem in im4java with p_profile(java.lang.String profileName) method:

ConvertCmd cmd = new ConvertCmd();
IMOperation op = new IMOperation();

op.addImage(sourcePath);
op.p_profile("*");
op.scale(123);
op.addImage(targetPath);

cmd.run(op);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top