Hi
I'm saving tiff file on code using the BitMircale library. The file opens properly on Windows and other image viewers. ImageJ shows a corrupted image. An example image can be found on https://copy.com/RpBz0qS3RToD. Does anyone have any idea why is this happening? Thanks, Yaniv |
Hello,
It looks like your image was recorded with the FillOrder tag<http://www.awaresystems.be/imaging/tiff/tifftags/fillorder.html>set to 2 (found by Curtis Rueden), which none of our TIFF readers were checking. It looks simple to reverse the byte values back, so there should be a fix in SCIFIO <http://scif.io/> and then Fiji <http://fiji.sc/Fiji>within the next few days if not sooner. Thanks for pointing this out! - Mark On Tue, Apr 29, 2014 at 10:12 AM, ImageJUser100 <[hidden email]> wrote: > Hi > > I'm saving tiff file on code using the BitMircale library. > The file opens properly on Windows and other image viewers. ImageJ shows a > corrupted image. > An example image can be found on https://copy.com/RpBz0qS3RToD. > > Does anyone have any idea why is this happening? > > Thanks, > Yaniv > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by ImageJUser100
Yaniv,
if the image is corrupted could you please tell the list why you think so. Not knowing what the image shows or should show, I have the impression that it is perfectly ok. Best Herbie ::::::::::::::::::::::::::::::::::::::: On 29.04.14 17:12, ImageJUser100 wrote: > Hi > > I'm saving tiff file on code using the BitMircale library. > The file opens properly on Windows and other image viewers. ImageJ shows a > corrupted image. > An example image can be found on https://copy.com/RpBz0qS3RToD. > > Does anyone have any idea why is this happening? > > Thanks, > Yaniv > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Mark Hiner
Thanks Mark
Once it will be fixed as you mentioned, how do I get the fix? Is it a new version of ImageJ? - Yaniv |
In reply to this post by Herbie-3
Hi Herbie
This is how the image is shown on Window Photo Viewer, And this is on ImageJ As you can see, it's clearly corrupted on ImageJ. Regards, Yaniv |
Nice, Yaniv,
the image you've linked in your original post was definitely not the corrupted one and it opens perfectly in ImageJ -- confusing. The links below now point to both images, correct and corrupted. Herbie ::::::::::::::::::::::::::::::::::::::: On 29.04.14 19:56, ImageJUser100 wrote: > Hi Herbie > > This is how the image is shown on Window Photo Viewer, > <http://imagej.1557.x6.nabble.com/file/n5007488/WindowsPhotoViewer.png> > > And this is on ImageJ > <http://imagej.1557.x6.nabble.com/file/n5007488/ImageJ.png> > > As you can see, it's clearly corrupted on ImageJ. > > Regards, > Yaniv > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482p5007488.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Are you saying you downloaded the image from https://copy.com/RpBz0qS3RToD, opened it on ImageJ and it displayed properly?
I tried the same file on several Windows systems with ImageJ 1.48 and all of them showed the corrupted image I posted on the last post. Yaniv |
Yaniv,
yes that's what I'm saying. The image at this link displays perfectly in my browser (TenForFox 24.4.0 on a Mac PowerPC G4 running OSX 10.4.11) and, when downloaded, also in ImageJ (32bit, version1.48v, Java 1.5.0_19). Best Herbie ::::::::::::::::::::::::::::::::::::::: On 29.04.14 20:41, ImageJUser100 wrote: > Are you saying you downloaded the image from https://copy.com/RpBz0qS3RToD, > opened it on ImageJ and it displayed properly? > > I tried the same file on several Windows systems with ImageJ 1.48 and all of > them showed the corrupted image I posted on the last post. > > Yaniv > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482p5007491.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by ImageJUser100
Yaniv,
Once it will be fixed as you mentioned, how do I get the fix? Is it a new > version of ImageJ? > The fix will be in Fiji <http://fiji.sc/Fiji>, and once it's available it's just a matter of running "Help>Update Fiji" to get the latest libraries. the image you've linked in your original post was definitely not the > corrupted one and it opens perfectly in ImageJ -- confusing. > Herbie - what version of ImageJ were you using, and were you just using File>Open? I downloaded a fresh 1.48v on OSX and definitely saw the same pixel inversion.. it definitely did not open perfectly for me in my ImageJ, or Fiji. Also, technically, I would not call the data corrupted.. if I understand the flag correctly, all the pixel values are correct, the reader just isn't accounting for their reversed order. - Mark On Tue, Apr 29, 2014 at 1:41 PM, ImageJUser100 <[hidden email]> wrote: > Are you saying you downloaded the image from https://copy.com/RpBz0qS3RToD > , > opened it on ImageJ and it displayed properly? > > I tried the same file on several Windows systems with ImageJ 1.48 and all > of > them showed the corrupted image I posted on the last post. > > Yaniv > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482p5007491.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
>
> 32bit, version1.48v, Java 1.5.0_19 Sorry, didn't see your response as I was typing mine. 1.48v, Java 1.6.0_65, 32 and 64 bit on OSX 10.8.5 open the inverted image for me. We'll see if it's an issue with the FillOrder tag... still seems likely. - Mark On Tue, Apr 29, 2014 at 1:57 PM, Mark Hiner <[hidden email]> wrote: > Yaniv, > > > Once it will be fixed as you mentioned, how do I get the fix? Is it a new >> version of ImageJ? >> > > The fix will be in Fiji <http://fiji.sc/Fiji>, and once it's available > it's just a matter of running "Help>Update Fiji" to get the latest > libraries. > > > the image you've linked in your original post was definitely not the >> corrupted one and it opens perfectly in ImageJ -- confusing. >> > > Herbie - what version of ImageJ were you using, and were you just using > File>Open? I downloaded a fresh 1.48v on OSX and definitely saw the same > pixel inversion.. it definitely did not open perfectly for me in my ImageJ, > or Fiji. > > Also, technically, I would not call the data corrupted.. if I understand > the flag correctly, all the pixel values are correct, the reader just isn't > accounting for their reversed order. > > - Mark > > > On Tue, Apr 29, 2014 at 1:41 PM, ImageJUser100 <[hidden email]> wrote: > >> Are you saying you downloaded the image from >> https://copy.com/RpBz0qS3RToD, >> opened it on ImageJ and it displayed properly? >> >> I tried the same file on several Windows systems with ImageJ 1.48 and all >> of >> them showed the corrupted image I posted on the last post. >> >> Yaniv >> >> >> >> -- >> View this message in context: >> http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482p5007491.html >> Sent from the ImageJ mailing list archive at Nabble.com. >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Mark Hiner-2
Mark,
as mentioned in my most recent post the 32bit-version of ImageJ I'm using is 1.48v (Java 1.5.0_19) on a Mac PowerPC G4 running OSX 10.4.11. The very image opens correctly in ImageJ either by using "File>Open" or by dragging it onto the ImageJ-Icon or its Tool-bar. It shows properly in my browser (TenFourFox 24.4.0) and in Photoshop version 10.0.1. Best Herbie :::::::::::::::::::::::::::::::::::: On 29.04.14 20:57, Mark Hiner wrote: > Yaniv, > > Once it will be fixed as you mentioned, how do I get the fix? Is it a new >> version of ImageJ? >> > > The fix will be in Fiji <http://fiji.sc/Fiji>, and once it's available it's > just a matter of running "Help>Update Fiji" to get the latest libraries. > > the image you've linked in your original post was definitely not the >> corrupted one and it opens perfectly in ImageJ -- confusing. >> > > Herbie - what version of ImageJ were you using, and were you just using > File>Open? I downloaded a fresh 1.48v on OSX and definitely saw the same > pixel inversion.. it definitely did not open perfectly for me in my ImageJ, > or Fiji. > > Also, technically, I would not call the data corrupted.. if I understand > the flag correctly, all the pixel values are correct, the reader just isn't > accounting for their reversed order. > > - Mark > > > On Tue, Apr 29, 2014 at 1:41 PM, ImageJUser100 <[hidden email]> wrote: > >> Are you saying you downloaded the image from https://copy.com/RpBz0qS3RToD >> , >> opened it on ImageJ and it displayed properly? >> >> I tried the same file on several Windows systems with ImageJ 1.48 and all >> of >> them showed the corrupted image I posted on the last post. >> >> Yaniv >> >> >> >> -- >> View this message in context: >> http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482p5007491.html >> Sent from the ImageJ mailing list archive at Nabble.com. >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Herbie,
Not sure why we have different results. The only thing that seems different is the Java version, but I don't see how that would matter here, since we just confirmed it was a problem with interpreting the FillOrder tag. You don't have any other plugins installed that may be being used for opening this file? Did you try with a fresh ImageJ or Fiji? Yaniv - Curtis Rueden just added FillOrder handling<https://github.com/scifio/scifio/commit/fedcfa5785b0895e6fa38712e86d1f334a7c4706>to SCIFIO and your file now opens perfectly (see this screenshot <http://hinerm.imagej.net/screenshot.png>). I'll let you know when this is uploaded to Fiji so you can update and get the fix! Thanks again for reporting this and making SCIFIO/Fiji better :) - Mark On Tue, Apr 29, 2014 at 2:08 PM, Herbie <[hidden email]> wrote: > Mark, > > as mentioned in my most recent post the 32bit-version of ImageJ I'm using > is 1.48v (Java 1.5.0_19) on a Mac PowerPC G4 running OSX 10.4.11. > > The very image opens correctly in ImageJ either by using "File>Open" or by > dragging it onto the ImageJ-Icon or its Tool-bar. It shows properly in my > browser (TenFourFox 24.4.0) and in Photoshop version 10.0.1. > > Best > > Herbie > > :::::::::::::::::::::::::::::::::::: > > On 29.04.14 20:57, Mark Hiner wrote: > >> Yaniv, >> >> Once it will be fixed as you mentioned, how do I get the fix? Is it a >> new >> >>> version of ImageJ? >>> >>> >> The fix will be in Fiji <http://fiji.sc/Fiji>, and once it's available >> it's >> >> just a matter of running "Help>Update Fiji" to get the latest libraries. >> >> the image you've linked in your original post was definitely not the >> >>> corrupted one and it opens perfectly in ImageJ -- confusing. >>> >>> >> Herbie - what version of ImageJ were you using, and were you just using >> File>Open? I downloaded a fresh 1.48v on OSX and definitely saw the same >> pixel inversion.. it definitely did not open perfectly for me in my >> ImageJ, >> or Fiji. >> >> Also, technically, I would not call the data corrupted.. if I understand >> the flag correctly, all the pixel values are correct, the reader just >> isn't >> accounting for their reversed order. >> >> - Mark >> >> >> On Tue, Apr 29, 2014 at 1:41 PM, ImageJUser100 <[hidden email]> >> wrote: >> >> Are you saying you downloaded the image from >>> https://copy.com/RpBz0qS3RToD >>> , >>> opened it on ImageJ and it displayed properly? >>> >>> I tried the same file on several Windows systems with ImageJ 1.48 and all >>> of >>> them showed the corrupted image I posted on the last post. >>> >>> Yaniv >>> >>> >>> >>> -- >>> View this message in context: >>> http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff- >>> tp5007482p5007491.html >>> Sent from the ImageJ mailing list archive at Nabble.com. >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thank you everyone for the help.
I've change the fill order from LSB2MSB to MSB2LSB and it fixed the issue. Thanks, Yaniv |
Hi Yaniv,
> I've change the fill order from LSB2MSB to MSB2LSB > and it fixed the issue. I think this is wise. According to the TIFF spec, the "LSB2MSB" (i.e., FillOrder=2) is only supposed to be used when BitsPerSample=1, whereas your data is BitsPerSample={8,8,8} (i.e., 24-bit RGB color). I'm sort of surprised the software you are using even supports FillOrder=2 since it is easy for writers to avoid using (again, according to the TIFF spec) and hence likely not well supported by many TIFF reader implementations. Regards, Curtis P.S. Since you have a working solution we will not push quite as hard to get the bug-fix uploaded to Fiji immediately -- we have some tangentially related issues to work out before doing so. But we will still reply back again when the bug-fix has been made available. On Wed, Apr 30, 2014 at 2:07 AM, ImageJUser100 <[hidden email]> wrote: > Thank you everyone for the help. > > I've change the fill order from LSB2MSB to MSB2LSB and it fixed the issue. > > Thanks, > Yaniv > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff-tp5007482p5007500.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Mark Hiner-2
Mark,
sorry for not being sufficiently explicit: You wrote: "The only thing that seems different is the Java version [...]" ... but that's not true and I thought you were aware of the communicated fact that I work on a Mac with PowerPC CPU that, as it is known, uses differently ordered bytes (when compared to Intel-CPUs). I have no idea how the TIFF-norm usually handles this issue, but it does and I never had any problems. That said, it is up to the coder to comply with the corresponding rules that apparently exist. Although today most users will work on machines with Intel-CPU, I think one should create software that can handle different byte orders... HTH Herbie :::::::::::::::::::::::::::::::::::: On 29.04.14 22:19, Mark Hiner wrote: > Herbie, > > Not sure why we have different results. The only thing that seems > different is the Java version, but I don't see how that would matter here, > since we just confirmed it was a problem with interpreting the FillOrder > tag. You don't have any other plugins installed that may be being used for > opening this file? Did you try with a fresh ImageJ or Fiji? > > Yaniv - Curtis Rueden just added FillOrder > handling<https://github.com/scifio/scifio/commit/fedcfa5785b0895e6fa38712e86d1f334a7c4706>to > SCIFIO and your file now opens perfectly (see this > screenshot <http://hinerm.imagej.net/screenshot.png>). > > I'll let you know when this is uploaded to Fiji so you can update and get > the fix! > > Thanks again for reporting this and making SCIFIO/Fiji better :) > > - Mark > > > On Tue, Apr 29, 2014 at 2:08 PM, Herbie <[hidden email]> wrote: > >> Mark, >> >> as mentioned in my most recent post the 32bit-version of ImageJ I'm using >> is 1.48v (Java 1.5.0_19) on a Mac PowerPC G4 running OSX 10.4.11. >> >> The very image opens correctly in ImageJ either by using "File>Open" or by >> dragging it onto the ImageJ-Icon or its Tool-bar. It shows properly in my >> browser (TenFourFox 24.4.0) and in Photoshop version 10.0.1. >> >> Best >> >> Herbie >> >> :::::::::::::::::::::::::::::::::::: >> >> On 29.04.14 20:57, Mark Hiner wrote: >> >>> Yaniv, >>> >>> Once it will be fixed as you mentioned, how do I get the fix? Is it a >>> new >>> >>>> version of ImageJ? >>>> >>>> >>> The fix will be in Fiji <http://fiji.sc/Fiji>, and once it's available >>> it's >>> >>> just a matter of running "Help>Update Fiji" to get the latest libraries. >>> >>> the image you've linked in your original post was definitely not the >>> >>>> corrupted one and it opens perfectly in ImageJ -- confusing. >>>> >>>> >>> Herbie - what version of ImageJ were you using, and were you just using >>> File>Open? I downloaded a fresh 1.48v on OSX and definitely saw the same >>> pixel inversion.. it definitely did not open perfectly for me in my >>> ImageJ, >>> or Fiji. >>> >>> Also, technically, I would not call the data corrupted.. if I understand >>> the flag correctly, all the pixel values are correct, the reader just >>> isn't >>> accounting for their reversed order. >>> >>> - Mark >>> >>> >>> On Tue, Apr 29, 2014 at 1:41 PM, ImageJUser100 <[hidden email]> >>> wrote: >>> >>> Are you saying you downloaded the image from >>>> https://copy.com/RpBz0qS3RToD >>>> , >>>> opened it on ImageJ and it displayed properly? >>>> >>>> I tried the same file on several Windows systems with ImageJ 1.48 and all >>>> of >>>> them showed the corrupted image I posted on the last post. >>>> >>>> Yaniv >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff- >>>> tp5007482p5007491.html >>>> Sent from the ImageJ mailing list archive at Nabble.com. >>>> >>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Herbie,
> I work on a Mac with PowerPC CPU that, as it is known, > uses differently ordered bytes (when compared to Intel-CPUs). The native byte order of your machine should not affect the behavior of Java programs. The Java specification manages byte ordering in a consistent way across architectures. -Curtis On Wed, Apr 30, 2014 at 4:11 AM, Herbie <[hidden email]> wrote: > Mark, > > sorry for not being sufficiently explicit: > > You wrote: > "The only thing that seems different is the Java version [...]" > > ... but that's not true and I thought you were aware of the communicated > fact that I work on a Mac with PowerPC CPU that, as it is known, uses > differently ordered bytes (when compared to Intel-CPUs). > > I have no idea how the TIFF-norm usually handles this issue, but it does > and I never had any problems. That said, it is up to the coder to comply > with the corresponding rules that apparently exist. > > Although today most users will work on machines with Intel-CPU, I think > one should create software that can handle different byte orders... > > HTH > > > Herbie > > :::::::::::::::::::::::::::::::::::: > On 29.04.14 22:19, Mark Hiner wrote: > >> Herbie, >> >> Not sure why we have different results. The only thing that seems >> different is the Java version, but I don't see how that would matter here, >> since we just confirmed it was a problem with interpreting the FillOrder >> tag. You don't have any other plugins installed that may be being used for >> opening this file? Did you try with a fresh ImageJ or Fiji? >> >> Yaniv - Curtis Rueden just added FillOrder >> handling<https://github.com/scifio/scifio/commit/ >> fedcfa5785b0895e6fa38712e86d1f334a7c4706>to >> SCIFIO and your file now opens perfectly (see this >> screenshot <http://hinerm.imagej.net/screenshot.png>). >> >> I'll let you know when this is uploaded to Fiji so you can update and >> get >> the fix! >> >> Thanks again for reporting this and making SCIFIO/Fiji better :) >> >> - Mark >> >> >> On Tue, Apr 29, 2014 at 2:08 PM, Herbie <[hidden email]> wrote: >> >> Mark, >>> >>> as mentioned in my most recent post the 32bit-version of ImageJ I'm using >>> is 1.48v (Java 1.5.0_19) on a Mac PowerPC G4 running OSX 10.4.11. >>> >>> The very image opens correctly in ImageJ either by using "File>Open" or >>> by >>> dragging it onto the ImageJ-Icon or its Tool-bar. It shows properly in my >>> browser (TenFourFox 24.4.0) and in Photoshop version 10.0.1. >>> >>> Best >>> >>> Herbie >>> >>> :::::::::::::::::::::::::::::::::::: >>> >>> On 29.04.14 20:57, Mark Hiner wrote: >>> >>> Yaniv, >>>> >>>> Once it will be fixed as you mentioned, how do I get the fix? Is it a >>>> new >>>> >>>> version of ImageJ? >>>>> >>>>> >>>>> The fix will be in Fiji <http://fiji.sc/Fiji>, and once it's >>>> available >>>> it's >>>> >>>> just a matter of running "Help>Update Fiji" to get the latest libraries. >>>> >>>> the image you've linked in your original post was definitely not the >>>> >>>> corrupted one and it opens perfectly in ImageJ -- confusing. >>>>> >>>>> >>>>> Herbie - what version of ImageJ were you using, and were you just >>>> using >>>> File>Open? I downloaded a fresh 1.48v on OSX and definitely saw the same >>>> pixel inversion.. it definitely did not open perfectly for me in my >>>> ImageJ, >>>> or Fiji. >>>> >>>> Also, technically, I would not call the data corrupted.. if I understand >>>> the flag correctly, all the pixel values are correct, the reader just >>>> isn't >>>> accounting for their reversed order. >>>> >>>> - Mark >>>> >>>> >>>> On Tue, Apr 29, 2014 at 1:41 PM, ImageJUser100 <[hidden email]> >>>> wrote: >>>> >>>> Are you saying you downloaded the image from >>>> >>>>> https://copy.com/RpBz0qS3RToD >>>>> , >>>>> opened it on ImageJ and it displayed properly? >>>>> >>>>> I tried the same file on several Windows systems with ImageJ 1.48 and >>>>> all >>>>> of >>>>> them showed the corrupted image I posted on the last post. >>>>> >>>>> Yaniv >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://imagej.1557.x6.nabble.com/ImageJ-shows-corrupted-image-on-tiff- >>>>> tp5007482p5007491.html >>>>> Sent from the ImageJ mailing list archive at Nabble.com. >>>>> >>>>> -- >>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>>> >>>>> >>>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>>> >>>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |