.tiff to .jpeg conversion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

.tiff to .jpeg conversion

parfait evouna
Hi everybody,

I would like to convert a ".tiff" image to a ".jpeg"; is there a possibility in a macro language of ImageJ?

Thank you for the help.

Parfait
     
Reply | Threaded
Open this post in threaded view
|

Re: .tiff to .jpeg conversion

Cammer, Michael
For instance:

run("Input/Output...", "jpeg=100 gif=-1 file=.txt copy_row save_column save_row");
open("D:\\Maria\\temp_image.tif");
saveAs("Jpeg", "D:\\Maria\\temp_image.jpg");

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of parfait evouna
Sent: Wednesday, July 27, 2011 1:25 PM
To: [hidden email]
Subject: .tiff to .jpeg conversion

Hi everybody,

I would like to convert a ".tiff" image to a ".jpeg"; is there a possibility in a macro language of ImageJ?

Thank you for the help.

Parfait
     

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================
Reply | Threaded
Open this post in threaded view
|

Re: .tiff to .jpeg conversion

ColinWhite
In reply to this post by parfait evouna
You could also use Process>Batch>Convert (just use Macros>Record to record the macro code).
Reply | Threaded
Open this post in threaded view
|

Re: .tiff to .jpeg conversion

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by parfait evouna
On Jul 27, 2011, at 1:24 PM, parfait evouna wrote:

> Hi everybody,
>
> I would like to convert a ".tiff" image to a ".jpeg"; is there a possibility in a macro language of ImageJ?

It is possible. Here is an example:

  setBatchMode(true);
  call("ij.io.FileSaver.setJpegQuality", 85);
  dir = getDirectory("home");
  open(dir+"image.tif");
  saveAs("Jpeg", dir+"image.jpg");

To convert a folder of images to JPEG, use the Process>Batch>Convert command.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: .tiff to .jpeg conversion

parfait evouna
In reply to this post by Cammer, Michael
Thx Michael, it works very well
-------From: [hidden email]---------
For instance:
 
run("Input/Output...", "jpeg=100 gif=-1 file=.txt copy_row save_column save_row");
open("D:\\Maria\\temp_image.tif");
saveAs("Jpeg", "D:\\Maria\\temp_image.jpg");
 
-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of parfait evouna
Sent: Wednesday, July 27, 2011 1:25 PM
To: [hidden email]
Subject: .tiff to .jpeg conversion
 
Hi everybody,
 
I would like to convert a ".tiff" image to a ".jpeg"; is there a possibility in a macro language of ImageJ?
 
Thank you for the help.
 
Parfait
     


> Date: Wed, 27 Jul 2011 14:10:55 -0400
> From: [hidden email]
> Subject: Re: .tiff to .jpeg conversion
> To: [hidden email]
>
> For instance:
>
> run("Input/Output...", "jpeg=100 gif=-1 file=.txt copy_row save_column save_row");
> open("D:\\Maria\\temp_image.tif");
> saveAs("Jpeg", "D:\\Maria\\temp_image.jpg");
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of parfait evouna
> Sent: Wednesday, July 27, 2011 1:25 PM
> To: [hidden email]
> Subject: .tiff to .jpeg conversion
>
> Hi everybody,
>
> I would like to convert a ".tiff" image to a ".jpeg"; is there a possibility in a macro language of ImageJ?
>
> Thank you for the help.
>
> Parfait
>      
>
> ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> =================================
     
Reply | Threaded
Open this post in threaded view
|

Re: .tiff to .jpeg conversion

parfait evouna
In reply to this post by Rasband, Wayne (NIH/NIMH) [E]
Hi Wayne,

Thank you very much, i have tried all the propositions and they work.

-parfait


-----On Jul 27, 2011, at 1:24 PM, parfait evouna wrote:---------
 
> Hi everybody,
>
> I would like to convert a ".tiff" image to a ".jpeg"; is there a possibility in a macro language of ImageJ?
 
It is possible. Here is an example:
 
  setBatchMode(true);
  call("ij.io.FileSaver.setJpegQuality", 85);
  dir = getDirectory("home");
  open(dir+"image.tif");
  saveAs("Jpeg", dir+"image.jpg");
 
To convert a folder of images to JPEG, use the Process>Batch>Convert command.
 
-wayne    
Reply | Threaded
Open this post in threaded view
|

Re: .tiff to .jpeg conversion

Antoinette
As we know, TIFF is a document format, while jpeg is an image form. So, if we want to convert tiff document to jpeg, I think we need to finish an imtermediary step, that is rendering TIFF document into image file. And then, we can take the easy image to image conversion method to convert to jpeg image.


Private Function GetPage(pageIdx As Integer) As BasePage Implements TIFFDocument.GetPage
End Function
Private Function toImage() As BaseImage Implements TIFFPage.toImage
End Function
Private Function toImage(width As Integer, height As Integer) As BaseImage Implements TIFFPage.toImage
End Function
Private Sub New(imagesource As List(Of REImage))
End Sub

Private Sub Convert(s As Stream, format As ImageFormat) Implements Image.Convert
End Sub