<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<div class="">Hi,</div>
<div class=""><br class="">
</div>
<div class="">Looking at the sample code provided I believe the cause of the issue is likely the line</div>
<div class="">writer.saveBytes(0, reader.openBytes(image));</div>
<div class=""><br class="">
</div>
<div class="">which should be using the image index as below: </div>
<div class="">writer.saveBytes(image, reader.openBytes(image));</div>
<div class=""><br class="">
</div>
<div class="">I would also recommend removing the setup and teardown of the reader and writer from within the loop, I have modified the sample code you provided to show how this might look at <a href="https://github.com/dgault/bio-formats-examples/blob/MailingListConvertExample/src/main/java/ReadWriteExample.java" class="">https://github.com/dgault/bio-formats-examples/blob/MailingListConvertExample/src/main/java/ReadWriteExample.java</a>. </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">With Thanks,</div>
<div class="">David Gault</div>
<div class=""><br class="">
</div>
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 19 Apr 2018, at 17:16, <a href="mailto:dalsim@eresmas.com" class="">
dalsim@eresmas.com</a> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""> I am developing a tool in Java using loci-tools.jar 5.8.1. Here you can see an extract of the code: <a href="https://shrib.com/#RjFIQ2X6UyqkAvv-eyCl" class="OWAAutoLink" id="LPlnk238896" previewremoved="true">https://shrib.com/#RjFIQ2X6UyqkAvv-eyCl</a></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">The idea of the code is to extract the videos from the .lif project, which only have black and white 16bit videos. I extract all the tiffs from all the videos and then I join them with ffmpeg. So at
the end, if a video has 300 frames, I will have 300 tiffs images, 1 image per frame. If the .lif project is <4GB everything works. If the .lif project, for example, is 10 or 17 GB, the extraction runs but the images are wrong. Here you can see an example: <a href="http://i68.tinypic.com/63ujgw.png" class="OWAAutoLink" id="LPlnk173840" previewremoved="true">http://i68.tinypic.com/63ujgw.png</a> On
your left, frame 1 series 0. On your rigth, frame 2 series 0. Time between images is 40ms so I suspect the tiny white particle on top of frame 1 is the same as the one down in frame 2. Videos inside both cases (4GB and 10GB) weight around 600 MB. If I remove
the last videos of the 10 or 17 GB .lif project so I save it in a new .lif project that weitgths less than 4 GB, the conversion is done without problems. Btw, ffmpeg is giving me an error of "Error in tiff header" with those "wrong images" but I can open them
with ImageJ and the result is what you saw in the previous images.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">What is the problem here?</div>
<br class="">
<br class="">
_______________________________________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br class="">
</div>
</blockquote>
</div>
<br class="">
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>