# TIFF support in TImage class - or lack there of

**URL:** <https://root-forum.cern.ch/t/tiff-support-in-timage-class-or-lack-there-of/41260>\
**Category:** General Chat\
**Tags:** graphics\
**Created:** [September 2, 2020, 2:05pm UTC](https://root-forum.cern.ch/t/tiff-support-in-timage-class-or-lack-there-of/41260 "2020-09-02T14:05:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenAdler](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/stephenadler/32/35568_2.png) [@StephenAdler](https://root-forum.cern.ch/u/StephenAdler)\
**Post date:** [September 2, 2020, 2:05pm UTC](https://root-forum.cern.ch/t/tiff-support-in-timage-class-or-lack-there-of/41260/1 "2020-09-02T14:05:18Z")

</div>

I’m trying to use TImage or TASImage class to read in a .tiff file. Don’t work. I’ve seen some post saying that one needs to convert .tiff to .gif or .jpg but there is some loss in image quality when converting to .gif. When converting to .jpg, I get an error that I don’t have the right jpg library, something to the effect that I have library 60 and it’s expecting library 80. Anyway, is there some underlying reason by .tiff is not supported? or is it just lack of coders needed to implement the support?

Thanks.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 2, 2020, 2:12pm UTC](https://root-forum.cern.ch/t/tiff-support-in-timage-class-or-lack-there-of/41260/2 "2020-09-02T14:12:16Z")

</div>

There is a similar discussion here:

> [@Failing to open and write .tiff images](https://root-forum.cern.ch/t/failing-to-open-and-write-tiff-images/35719):
>
> Hi When I try to convert a .jpg image to a .tiff file I get the following message: TImage \*img1 = TImage::Open("/Users/cashcrusaders/Documents/cluster/Archive/cluster.jpg"); if (!img1) { printf("Could not create an image... exit\n"); } img-\>WriteImage("cluster.tiff") But I get the following message: Error in \<TASImage::WriteImage\>: error writing file cluster.tiff I also tried to open a sample .tiff image that I got from the net using the following: TImage \*img = TImag…

---

<div class="post-metadata">

**Author:** ![StephenAdler](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/stephenadler/32/35568_2.png) [@StephenAdler](https://root-forum.cern.ch/u/StephenAdler)\
**Post date:** [September 2, 2020, 3:36pm UTC](https://root-forum.cern.ch/t/tiff-support-in-timage-class-or-lack-there-of/41260/3 "2020-09-02T15:36:56Z")

</div>

Thanks, I fixed the problem. I rebuilt root turning off the use of the builtin afterimage library and downloaded and installed the Fedora libAfterImage package. After rebuilding root, it all works! I can open and work with .tif files directly. Thanks for guiding me to the solution.
