[ImageJ-bugs] [Bug 1032] I'm trying to merge two images (1 gb each, tiff files) and Image J processess the top half of the image while the bottom is black.
bugzilla at fiji.sc
bugzilla at fiji.sc
Wed Mar 25 12:59:18 CDT 2015
http://fiji.sc/bugzilla/show_bug.cgi?id=1032
--- Comment #12 from Wayne Rasband <wsr at nih.gov> ---
The following example macro creates two 850 megapixel images, merges them,
scales the merged image to 2048x2048, saves it as JPEG and displays it. It does
this without displaying any of the 850 megapixel images. The resulting JPEG
file is 137K.
MB = 850;
setBatchMode(true);
w = sqrt(MB*1024*1024);
doCommand("Monitor Memory...");
newImage("c1", "8-bit ramp", w, w, 1);
newImage("c2", "8-bit ramp", w, w, 1);
run("Rotate 90 Degrees Right");
run("Merge Channels...", "c1=c1 c2=c2");
run("Size...", "width=2048 height=2048 constrain interpolation=Bilinear");
saveAs("Jpeg", "");
setBatchMode(false);
This version of the macro saves the 850 megapixel merged image as a 15MB
(29,854x29,854) JPEG without displaying anything.
MB = 850;
setBatchMode(true);
w = sqrt(MB*1024*1024);
doCommand("Monitor Memory...");
newImage("c1", "8-bit ramp", w, w, 1);
newImage("c2", "8-bit ramp", w, w, 1);
run("Rotate 90 Degrees Right");
run("Merge Channels...", "c1=c1 c2=c2");
saveAs("Jpeg", "");
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20150325/6070a31b/attachment.html>
More information about the Imagej-bugs
mailing list