Posted by
Jerome Mutterer-3 on
URL: http://imagej.273.s1.nabble.com/Text-image-to-JPEG-tp5009602p5009604.html
Hi,
You can use the File >Import > Text Image... command to import your binary
matrix, and then save the result image using File > Save As > Jpeg... or
File > Save As > Tiff... commands.
Do this with the command recorder activated, and see the recorded macro
statements.
They will look like this :
run("Text Image... ", "open=/Users/jmutterer/Desktop/binary.txt");
saveAs("Tiff", "/Users/jmutterer/Desktop/binary.tif");
You can use these to modify the example
http://rsb.info.nih.gov/ij/macros/BatchProcessFolders.txt macro to
sequentially import and save your images. In the latter macro, modify
the processFile(path)
function so that it looks like this :
function processFile(path) {
run("Text Image... ", "open=["+path+"]");
saveAs("Tiff", path);
close();
}
Jerome
On 12 September 2014 14:47, Waldir Leite Roque <
[hidden email]> wrote:
> I have a sequence of text binary images (matrix of 0 and 1) and I would
> like to convert them to JPG or Tif, etc, but I could not find the way using
> ImageJ. Can anyone help me with this task?
>
> Thank you.
>
> Waldir
>
>
>
> --
> Dr. Waldir Leite Roque
> Prof. Associado IV
> Programa de Pós-Graduação em Modelagem Matemática e Computacional
> Departamento de Computação Científica
> Centro de Informática
> Universidade Federal da Paraíba
> 58051-900 João Pessoa, PB
>
[hidden email]
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
T 0367155339
www.ibmp.cnrs.fr
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html