twelvemonkeys

Is there anyway to configure twelve monkeys JPEGSegmentUtil segment reader to read all segments of a JPEG

时间秒杀一切 提交于 2019-12-25 01:55:43
问题 I am currently prototyping functionality in an app I wish to create, which requires the ability to read/modify/write metadata of a jpeg file. One way I thought might work for this is to use the twelve-monkeys java API to read all segments in, modify those metadata segments I am interested in, and write all the segments (most of them being unmodified) back to a new file. In my prototyping I came across a hurdle which triggered a question I, I have to admit, direct mainly at the author of the

Create Multi-Page Tiff with Java

佐手、 提交于 2019-12-17 19:59:10
问题 I'm interested in taking a tif image and adding a layer to it that contains text with Java, preferably with the Twelve Monkeys image library if possible. I can tweak the code from here to either add text to a tif or create a new tif of the same size with only text, but not save them as a multi-page tif. For example: import javax.imageio.*; import javax.imageio.stream.ImageOutputStream; import java.awt.*; import java.awt.image.*; import java.io.*; public class ImageUtil { public static void

ImageIO Unsupported Image Type - TwelveMonkeys Plugin with fix not working?

北城余情 提交于 2019-12-13 20:09:10
问题 I encountered the Unsupported Image Type error due to an incompatible colour profile using com.sun.imageio.plugins.jpeg.JPEGImageReader . I later found the TwelveMonkeys plugins that are proven to fix this issue and have referenced the dependent .jars in my project classpath. I downloaded them from the TwelveMonkeys github repository. Note i'm using version 3.0.2 because I'm running on Java 6 with JDK 1.6.0_45. These are the .jars I've added to my project: common-lang-3.0.2.jar common-io-3.0

Stripping Alpha Channel from Images

人走茶凉 提交于 2019-12-12 10:49:33
问题 I want to strip the alpha channel (transparent background) from PNGs, and then write them as JPEG images. More correctly, I'd like to make the transparent pixels white. I've tried two techniques, both of which fail in different ways: Approach 1: BufferedImage rgbCopy = new BufferedImage(inputImage.getWidth(), inputImage.getHeight(), BufferedImage.TYPE_INT_RGB); Graphics2D graphics = rgbCopy.createGraphics(); graphics.drawImage(inputImage, 0, 0, Color.WHITE, null); graphics.dispose(); return

Create Multi-Page Tiff with Java

隐身守侯 提交于 2019-11-28 10:34:38
I'm interested in taking a tif image and adding a layer to it that contains text with Java, preferably with the Twelve Monkeys image library if possible. I can tweak the code from here to either add text to a tif or create a new tif of the same size with only text, but not save them as a multi-page tif. For example: import javax.imageio.*; import javax.imageio.stream.ImageOutputStream; import java.awt.*; import java.awt.image.*; import java.io.*; public class ImageUtil { public static void main(String[] args) throws Exception { BufferedImage src = ImageIO.read(new File("/path/to/main.tif"));