I store many gel images which are included in my Latex notebooks. The geldoc software normally produces TIFF files, however, Latex only accepts PNG or JPEG.

If I am going to store only a single copy of my DNA agarose gel images, which format is a good idea? PNG, or JPEG? Is there a good reason to keep one copy in TIFF and one copy in another format for every gel?

  • $\begingroup$ I asked this here because an answer would require understanding of what sorts of information is recorded when a gel photo is taken, and how valuable they are for research purposes. I'm open to the idea of migrating it elsewhere (for instance SuperUser) if that seems more appopriate. $\endgroup$ – Superbest Jun 11 '14 at 3:29
  • 1
    $\begingroup$ JPEG is a lossy format. So save it as PNG. All these are raster graphics; all of them store images as pixels only. The differences lie in the compression methods and resolution. $\endgroup$ – WYSIWYG Jun 11 '14 at 4:11
  • 2
    $\begingroup$ BTW This question appears to be off-topic because it is about image formats which is not in the realm of this forum. $\endgroup$ – WYSIWYG Jun 11 '14 at 4:12
  • 3
    $\begingroup$ @Chris I think the major issue here is not TeX-specific, it is more about good practices for documentation of scientific data. $\endgroup$ – Mad Scientist Jun 11 '14 at 5:59
  • 1
    $\begingroup$ I agree with Mad Scientist response. More often than not the images I produce from microscopy or imaging are TIFF (my raw data files) and TIFF (the raw data) is more reliable for things such as pixel densitometry analysis (used for quantification analysis). $\endgroup$ – Behzad Rowshanravan Jun 11 '14 at 9:20

Always keep the raw data files! This is always a good idea for scientific data, and the only exception should be if the raw data is prohibitively large and it is not feasible to store it completely. This is not the case for gel images, so I would always keep the originals, and then use a cropped and edited copy in a suitable format for documents.

The original image has the full amount of data, any conversion can potentially destroy data. For example, some imaging systems produce images with more than 8 bit color depth. Converting to another format will in many cases reduce the color depth to 8 bit as many programs and some image formats like JPEG don't support higher color depths.

JPEG is lossy compression, I would always prefer PNG. You might have to use JPEG at some point because of the file size, but that should be at the latest point possible.

| improve this answer | |
  • $\begingroup$ No reason to ever use jpg. PNG is also a compressed format. $\endgroup$ – terdon Jun 11 '14 at 11:52
  • $\begingroup$ But Jpeg can compress by an order of magnitude more, by the nature of its lossy compression. PNG will compress in a similar manner to ZIP and so the gains are fair less. $\endgroup$ – sksamuel Jun 11 '14 at 12:04
  • $\begingroup$ @terdon The lossless compression of PNGs still results in much larger images than JPEG. I personally use PNGs for almost everything, but there are situations where you need smaller files and where JPEG can be acceptable. $\endgroup$ – Mad Scientist Jun 11 '14 at 12:05
  • $\begingroup$ True. I'm just leery of JPG since they can easily get corrupted. Personally, I'd probably just convert the TIFFs to EPS and deal with those. $\endgroup$ – terdon Jun 11 '14 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.