ImageIO « Icon Image « Java Swing Q&A





1. using imageio with sdk1.3    coderanch.com

quick? im trying to access images using imageio lib, but it does not exist in sdk1.3 (the only thing that would load on all the computers at my school). can i just copy my folder from 1.4 onto those machines or is there a better way? (so it gave an error importing the javax.imageio thanks, jeff

2. ImageIO.write gives me Exception_Access_Violation    coderanch.com

OK, here it is... I've narrowed the problem down to this area of code. (Everything is correctly declared and in a try block) BufferedImage image = ImageIO.read(chooser.getSelectedFile().toURL()); if (image == null) { //System.err.println("Invalid input file format"); } boolean found = ImageIO.write(image, "jpg", outputFile); BufferedImage newImage = ImageIO.read(outputFile); theImage = new ImageIcon(newImage); return theImage; And like I said, sometimes it works, sometimes ...

3. Why ImageIO.write() creates image with double size than original    coderanch.com

JPEG is not a faithful round-trip format. That means if you read a JPEG into memory, and then write it back to disk, you won't get exactly the same file. The file size can differ, and so can the colors being used. The latter point especially is important to remember. If you need faithful round-tripping you need to use a format ...

4. batik and ImageIO.write    coderanch.com

5. Problem with ImageIO.write    coderanch.com

I want to load an image from a JPG file draw some text with a program and create a file with the image and the text. This is my test class: package test; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.imageio.ImageIO; public class TestWrite { /** * @param args */ public static void ...

6. Help with ImageIO    java-forums.org

I am trying to write a program which draws an image on the screen, allows the user to draw on top of that image, and then saves a jpg of what the user drew, MINUS THE ORIGINAL IMAGE. Java Code: import java.util.*; import javax.imageio.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.lang.*; import java.io.*; import java.awt.image.*; import java.util.ArrayList; import java.awt.Graphics; import ...