Questions tagged [apache-commons-imaging]

Apache commons imaging tag refers to java library for reading and writing images, including metadata. It is part of Apache Commons project - reusable, open source Java software components.

Apache commons imaging tag refers to java library for reading and writing images, including metadata. It is part of project - reusable, open source Java software components.

Apache commons imaging was previously known as Sanselan

Project webpage

11 questions
6
votes
1 answer

How to get outputstream from an S3Object?

My goal is to fetch an object (image) from S3, change the metadata of the file, and replace it with new file that has changed metadata. For changing the metadata I am using commons imaging library. I have coded the sample below that works as…
Anthony
  • 33,838
  • 42
  • 169
  • 278
5
votes
2 answers

Gradle not finding org.apache.commons:commons-imaging

Gradle cannot resolve org.apache.commons:commons-imaging, yet it is available in all 3 of the provided…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
4
votes
2 answers

Write EXIF data to TIFF file using Apache Commons Imaging

How can I write EXIF data to a TIFF image using Apache Commons Imaging? This is what I tried: File img = new File("pic.tif"); File dst = new File("out.tif"); try (FileOutputStream fos = new FileOutputStream(dst); OutputStream os = new…
Chin
  • 19,717
  • 37
  • 107
  • 164
3
votes
0 answers

Trouble comparing Java strings (of different encoding)

I'm writing EXIF metadata to a JPEG using Apache Commons Imaging (Sanselan), and, at least in the 0.97 release of Sanselan, there were some bugs related to charset/encoding. The EXIF 2.2 standard requires that the encoding of fields of type…
joakimk
  • 822
  • 9
  • 26
2
votes
1 answer

Apache Commons Imaging - convert tiff to jpg

I need to convert a tiff image into a jpg one using Apache Commons Imaging. I tried to but I can't figure out how to do it using this library. final BufferedImage image = Imaging.getBufferedImage(new File(image)); final ImageFormat format =…
lch
  • 2,028
  • 2
  • 25
  • 46
1
vote
1 answer

How to retain transparancy in TIFF images using apache.commons.imaging in java

When calling Imaging.getBufferedImage(image); where image is a byte array containing a TIFF image with an alpha layer the resulting BufferedImage does not have an alpha channel. How can I either retain the alpha channel when calling…
0
votes
1 answer

Write JPEG Exif DateTimeOriginal and TimeZoneOffset from scratch using Apache Commons Imaging

I have a JPEG file from which I have removed all metadata. Using Java with Apache Commons Imaging I want to add custom metadata to the JPEG from scratch. Using ExifRewriter().updateExifMetadataLossy(…) I have managed to update the following Exif…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
0
votes
1 answer

Scaling images with Apache Commons Imaging

I would like a high-quality way to scale images, in particular JPEG images, using Java. I looked into this extensively around 2007, and at the time JAI had problems that would produce black borders in some scaled images. Back then I finally settled…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
0
votes
1 answer

Re-write file without EXIF data in Android Studio

I want the java code or library to write the minimal EXIF data back to IMAGE files (JPG, GIF, PNG, etc.) in Android Studio. The EXIFREWRITER is not working. Also, METADATAEXTRACTOR is extracting but not re-writing back to the file. Thanks!
0
votes
1 answer

Editing both jpg tag and title using Apache Imaging Library

I am trying to bulk edit over 2000 jpg photos with a title and tag. I can easily get both the ImageDescription (tag) and Title fields but I cannot find a way to insert a new title and new tags. Are there any examples on how to insert new titles and…
-1
votes
1 answer

Illegal entry in Gradle Dependencies for org.apache.commons commons-imaging 1.0-alpha2-SNAPSHOT

I just add compile 'org.apache.commons:commons-imaging:1.0-alpha2-SNAPSHOT' to file build.gradle, when I run Gradle Refresh Dependencies, I got an error as below, what can I do? Illegal entry in Gradle Dependencies: C:/eclipse/unresolved dependency…
mikezang
  • 2,291
  • 7
  • 32
  • 56