Posted by
Michael Schmid on
Mar 24, 2016; 9:03am
URL: http://imagej.273.s1.nabble.com/jpeg-artifacts-tp5015994p5015997.html
Hi John,
here is another very simple example where you can see the artifacts with
the bare eye, even at 100% JPEG quality (you can set it in
Edit>Options/Input/Output). The lines get a colored 'halo'.
newImage("Untitled", "RGB ramp", 100, 100, 1);
setForegroundColor(255, 0, 0);
makeLine(17, 16, 93, 85);
run("Draw", "slice");
setForegroundColor(255, 255, 0);
makeLine(21, 60, 88, 15);
run("Draw", "slice");
setForegroundColor(0, 255, 0);
makeLine(67, 77, 45, 17);
run("Draw", "slice");
setForegroundColor(0, 255, 255);
makeLine(23, 40, 78, 34);
run("Draw", "slice");
setForegroundColor(0, 0, 255);
makeLine(11, 23, 86, 76);
run("Draw", "slice");
setForegroundColor(255, 0, 182);
makeLine(44, 83, 67, 10);
run("Draw", "slice");
run("Select None");
tempFilePath = getDirectory("temp")+"temp_temp.jpg";
saveAs("Jpeg", tempFilePath);
run("Revert"); //read the JPEG
File.delete(tempFilePath);
run("In [+]");
run("In [+]");
run("In [+]");
run("In [+]");
run("In [+]");
Michael
________________________________________________________________
On 2016-03-23 19:30, John Brear wrote:
> Hi,
> I am relatively new to ImageJ - investigating its suitability for quantitative metallography, particularly precipitate particle characterisation. My apologies, therefore, if I am treading on well-worn ground.
>
> In the user guide I see strong warnings against using jpeg images, see 'Noteworthy II, X'.
> However, I cannot reproduce the effects described, neither using the exmple image of the mandril/baboon (which is supplied as a jpeg anyway??), nor using my own images. I have tried comparing bmp, jpg, tif, gif, png.
>
> Is this advice still current?
> If so, can someone supply a definitive, reproducible example that I and my team can use as a test case?
>
> Thanks in anticipation,
> Best wishes,
> John
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html