jpeg stacks

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

jpeg stacks

William O'Connell
Hello all,

When I attempt to save a Stack as jpeg. I save only a single image. I'm using ImageJ 1.24s.  Is this correct behavior?

cheers, Bill
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Gabriel Landini
On Friday 02 June 2006 01:52, William O'Connell wrote:
> When I attempt to save a Stack as jpeg. I save only a single image. I'm
> using ImageJ 1.24s.  Is this correct behavior?

Yes, there are no jpeg stacks, only TIFF.
By the way, using lossy jpeg compression when doing image analysis/processing
is not a good idea.

Cheers,

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

William O'Connell
In reply to this post by William O'Connell
Sorry, meant to say version 1.34s.
Bill

 -------------- Original message ----------------------
From: "William O'Connell" <[hidden email]>
> Hello all,
>
> When I attempt to save a Stack as jpeg. I save only a single image. I'm using
> ImageJ 1.24s.  Is this correct behavior?
>
> cheers, Bill
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Ahmed Khwaja
In reply to this post by William O'Connell
Hi Bill,
You can save the stack in Imagej 1.37f as jpeg. Goto File-> Save as-> Image
Sequence (SELECT JPEG IN THE FORMAT).
Ahmed

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
William O'Connell
Sent: Thursday, 01 June, 2006 9:53 PM
To: [hidden email]
Subject: jpeg stacks

Hello all,

When I attempt to save a Stack as jpeg. I save only a single image. I'm
using ImageJ 1.24s.  Is this correct behavior?

cheers, Bill
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Gabriel Landini
In reply to this post by William O'Connell
> Hi Bill,
> You can save the stack in Imagej 1.37f as jpeg. Goto File-> Save as-> Image
> Sequence (SELECT JPEG IN THE FORMAT).

That is not a *stack*, it is a *sequence*.
Stacks, -as far as I understand- are only tiff.
G.
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Robert Dougherty
Sometimes you can achieve a lot of compression with the combination of Gif
Stack Writer (see "Save stacks as animated gifs" on the plugins page) and
Animated Gif Reader.  It works especially well with computed color contour
plots.  Watch out for playing the animations in Power Point though.
Different installations can work differently or not at all.
Bob

 
>
> > Hi Bill,
> > You can save the stack in Imagej 1.37f as jpeg. Goto File-> Save as->
> Image
> > Sequence (SELECT JPEG IN THE FORMAT).
>
> That is not a *stack*, it is a *sequence*.
> Stacks, -as far as I understand- are only tiff.
> G.
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

dscho
In reply to this post by Gabriel Landini
Hi,

On Fri, 2 Jun 2006, Gabriel Landini wrote:

> By the way, using lossy jpeg compression when doing image
> analysis/processing is not a good idea.

No kidding. I just ran into that problem: even setting the JPEG quality to
100%, the differences of "Find edges" as compared to the raw data are
quite visible!

Ciao,
Dscho
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Philip Ershler
On Jun 2, 2006, at 6:12 PM, Johannes Schindelin wrote:

> Hi,
>
> On Fri, 2 Jun 2006, Gabriel Landini wrote:
>
>> By the way, using lossy jpeg compression when doing image
>> analysis/processing is not a good idea.
>
> No kidding. I just ran into that problem: even setting the JPEG  
> quality to
> 100%, the differences of "Find edges" as compared to the raw data are
> quite visible!
>

JPEG artifacts are most pronounced along lines or regions of  
significant contrast changes. So it's not unexpected that find edges  
is significantly effected.

Phil
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

dscho
Hi,

On Fri, 2 Jun 2006, Philip Ershler wrote:

> On Jun 2, 2006, at 6:12 PM, Johannes Schindelin wrote:
>
> > Hi,
> >
> > On Fri, 2 Jun 2006, Gabriel Landini wrote:
> >
> > > By the way, using lossy jpeg compression when doing image
> > > analysis/processing is not a good idea.
> >
> > No kidding. I just ran into that problem: even setting the JPEG quality to
> > 100%, the differences of "Find edges" as compared to the raw data are
> > quite visible!
> >
>
> JPEG artifacts are most pronounced along lines or regions of significant
> contrast changes. So it's not unexpected that find edges is significantly
> effected.

Well, it was for me, since I mistakenly assumed that 100% quality equals
lossless. Which just is not true with JPEG.

Ciao,
Dscho
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Harry Parker
In reply to this post by William O'Connell
Hello Bill,

Not sure what you need to do, but you CAN if you want to, despite all the posted warnings, save and open stacks of JPEG compressed images by using the ImageIO plugin. Its at http://ij-plugins.sourceforge.net/plugins/imageio/

The output will be a TIFF file containing JPEG images rather than a JPEG file.

Hope this helps.

-- Harry

William O'Connell <[hidden email]> wrote: Hello all,

When I attempt to save a Stack as jpeg. I save only a single image. I'm using ImageJ 1.24s.  Is this correct behavior?

cheers, Bill



--  
Harry Parker  
Systems Engineer  
Dialog Imaging Systems, Inc.
               
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Gabriel Landini
On Saturday 03 June 2006 18:04, Harry Parker wrote:
> Not sure what you need to do, but you CAN if you want to, despite all the
> posted warnings, save and open stacks of JPEG compressed images by using
> the ImageIO plugin. Its a http://ij-plugins.sourceforge.net/plugins/imageio/

I tried what you suggested but the plugin gives this error:

java.lang.IllegalArgumentException: JPEG format does not support multi-image
files. Image was not saved.
        at net.sf.ij.jaiio.JAIWriter.write(JAIWriter.java:188)
        at net.sf.ij.plugin.ImageIOSaveAsPlugin.write(ImageIOSaveAsPlugin.java:228)
        at net.sf.ij.plugin.ImageIOSaveAsPlugin.run(ImageIOSaveAsPlugin.java:199)
        at ij.IJ.runUserPlugIn(IJ.java:262)
        at ij.IJ.runPlugIn(IJ.java:116)
        at ij.Executer.runCommand(Executer.java:95)
        at ij.Executer.run(Executer.java:49)
        at java.lang.Thread.run(Thread.java:619)

> The output will be a TIFF file containing JPEG images rather than a JPEG
> file.

The tiff format does not support the jpeg compression (please correct me if I
am wrong). Am I missing something?

Cheers,

Gabriel
Reply | Threaded
Open this post in threaded view
|

Antwort: Re: jpeg stacks

Joachim Wesner
Hi Gabriel,

it does! Basically, you can expand TIFF (Taged Imaged File Format) with own
Tags and this way also store any information you like and also include any
compression you wish, clearly, yet it might not be very portable.

However, JPEG-in-TIFF seems to be pretty common, the popular
viewer-and-converter IrfanView can use Jpeg compression in TIFFs (However,
ImageJ can not (yet?) read such a file, just tried it)

It seems there was an issue with earlier implementations of this,

JPEG - in - TIFF
      Another effort involves the encapsulation of a decent lossy JPEG
      stream within TIFF; the original 6.0 spec was not worked out
      correctly. Tom Lane led the development of the new TIFF
      implementation called JPEG-in-TIFF. The current libtiff package
      offers some level of JPEG support, when linked with the IJG JPEG
      library, available at ftp.uu.net (if you can ever get in), or at
      ftp.cs.wisc.edu. See also Tom Lane's JPEG Frequently Asked Questions
      file.

and

http://www.remotesensing.org/libtiff/TIFFTechNote2.html


Maybe this is the reason for the failure!?

Joachim



                                                                                                                                       
                      Gabriel Landini                                                                                                  
                      <G.Landini@BHAM.         An:      [hidden email]                                                            
                      AC.UK>                   Kopie:   (Blindkopie: Joachim Wesner/DEWET/LMSCentral/Leica)                            
                      Gesendet von:            Thema:   Re: jpeg stacks                                                                
                      ImageJ Interest                                                                                                  
                      Group                                                                                                            
                      <[hidden email]                                                                                                
                      .GOV>                                                                                                            
                                                                                                                                       
                                                                                                                                       
                      03.06.2006 23:06                                                                                                
                      Bitte antworten                                                                                                  
                      an ImageJ                                                                                                        
                      Interest Group                                                                                                  
                                                                                                                                       




> The output will be a TIFF file containing JPEG images rather than a JPEG
> file.

The tiff format does not support the jpeg compression (please correct me if
I
am wrong). Am I missing something?

Cheers,

Gabriel



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Harry Parker
In reply to this post by Gabriel Landini
The TIFF reader that comes with ImageJ does not support JPEG compression, but the TIFF standard does, as an option.

You need to save the file as Compressed TIFF, not as JPEG.  Its a new option at the bottom of the File->Save As menu.

With the ImageIO plugin installed, and a color stack open, try selecting File->Save As->Compressed TIFF..., then after selecting a file name and folder, another dialog pops up requesting the compression methos desired. Choose JPEG.

You can also save them via the menu path Plugins->Image IO->Save As... .

Note that you need to use the Plugins->Image IO path to open the resulting file.

Gabriel Landini <[hidden email]> wrote: On Saturday 03 June 2006 18:04, Harry Parker wrote:
> Not sure what you need to do, but you CAN if you want to, despite all the
> posted warnings, save and open stacks of JPEG compressed images by using
> the ImageIO plugin. Its a http://ij-plugins.sourceforge.net/plugins/imageio/

I tried what you suggested but the plugin gives this error:

...

> The output will be a TIFF file containing JPEG images rather than a JPEG
> file.

The tiff format does not support the jpeg compression (please correct me if I
am wrong). Am I missing something?

Cheers,

Gabriel



--  
Harry Parker  
Systems Engineer  
Dialog Imaging Systems, Inc.
               
---------------------------------
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail Beta.
Reply | Threaded
Open this post in threaded view
|

Re: jpeg stacks

Gabriel Landini
In reply to this post by William O'Connell
Thanks Joachim and Harry for the insight.

Yes, it works as you suggested.

One learns something new every day :-)

Cheers,

Gabriel