[
https://issues.apache.org/jira/browse/IMAGING-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bjoeni closed IMAGING-274.
--------------------------
Resolution: Not A Bug
Sorry, I didn't properly read the documentation. I passed the file bytes as
exif bytes which obviously doesn't work. I'm using the lossy TIFF writer for
now.
{code:java}
new TiffImageWriterLossy().write(os, outputSet);
{code}
> Corrupted TIFF output
> ---------------------
>
> Key: IMAGING-274
> URL: https://issues.apache.org/jira/browse/IMAGING-274
> Project: Commons Imaging
> Issue Type: Bug
> Components: Format: TIFF
> Affects Versions: 1.0-alpha1, 1.0-alpha2
> Reporter: Bjoeni
> Priority: Major
> Attachments: 20171029_171217 - 20171029_171223-gps-corrupted.tif,
> 20171029_171217 - 20171029_171223-original.tif
>
>
> I'm attempting to update GPS data in JPEG and TIFF files. The following
> example results in corrupted TIFF files while working perfectly fine for JPEG:
> {code:java}
> try (BufferedOutputStream os = new BufferedOutputStream(new
> FileOutputStream(dst))) {
> if (metadata instanceof JpegImageMetadata) {
> new
> ExifRewriter().updateExifMetadataLossless(imageFile, os, outputSet);
> } else if (metadata instanceof TiffImageMetadata) {
> new
> TiffImageWriterLossless(FileUtils.readFileToByteArray(imageFile)).write(os,
> outputSet);
> }
> }
> {code}
> I attached both the original and the updated (corrupted) TIFF file with GPS
> data. Some software (e.g. Windows Photos) is able to show the images with
> black stripes, other software (including javax.ImageIO) is unable to read
> them at all.
> And even though not exactly related to this issue: It would be really awesome
> to have a similar ExifRewriter function for TIFF files!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)