Questions tagged [javax.imageio]

The Java Image I/O API (the javax.imageio package) contains the basic classes and interfaces for reading/writing BufferedImages and RenderedImages from/to image files and streams.

The Java Image I/O API (the javax.imageio package) contains the basic classes and interfaces for reading/writing BufferedImages and RenderedImages from/to image files and streams.

Many common image I/O operations may be performed using the static methods of the ImageIO class.

The package contains classes describing the contents of image files, including metadata and thumbnails (IIOImage); for controlling the image reading process (ImageReader, ImageReadParam, and ImageTypeSpecifier) and image writing process (ImageWriter and ImageWriteParam); for performing transcoding between formats (ImageTranscoder), and for reporting errors (IIOException).

All implementations of javax.imageio provide the following standard image format plug-ins: JPEG, PNG, BMP, WBMP and GIF.

The javax.imageio package has been available since Java (J2SE) 1.4.

1092 questions
0
votes
1 answer

Can I read InputStream through a BufferedImage?

InputStream bais = new ByteArrayInputStream(b); BufferedImage bImageFromConvert = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics g = bImageFromConvert.createGraphics(); g = cvrimg.getGraphics(); g.drawImage(bImageFromConvert,…
0
votes
1 answer

java applet cant load more than 1 image

I got a problem im trying to make a java game in an applet. I can't load more then 1 image, otherwise it will not load. I am getting the images of the jar file. Code loader: public BufferedImage LoadTex(String ura) { BufferedImage res =…
0
votes
1 answer

Creating an image out of raw data in Java

I have written a small TCP client to retrieve various data. It works fine for text, but I have no clue how to implement image processing. At the moment, the incoming data is stored in an ArrayList: public ArrayList
laserbrain
  • 985
  • 3
  • 10
  • 20
0
votes
1 answer

Finding the compression type in an image file

I want to find the compression type for an image that is currently stored as .bin file (dont know why its stored like this it just is) but my question is should I find the compression type while its in a .bin file or should I do it when I convert to…
Michelle
  • 21
  • 3
0
votes
1 answer

Decoding base64 image received as email on Google App Engine

I want to decode a base64 encoded image received over email on Google App Engine(GAE). When I extract the image from MimeMessage I get a base64DecoderStream object. I initially assumed that this decoded data is byte array in ARGB format, but that…
mabicha
  • 337
  • 2
  • 7
  • 16
0
votes
1 answer

Java ImageIO.read() OutOfMemoryError while loading large numbers of files

I'm writing a 2D game in Java and I'm having trouble loading images into an image handler. First off, I want to say that the system works until I start to load more than 15 images. I have an AnimationHandler class that is given the names and paths…
Peteyslatts
  • 123
  • 1
  • 7
0
votes
1 answer

Serializing/Deserializing buffered images

I have a collection of buffered images that I want to serialize and then deserialize. For example I have an arrayList full of buffered images which are iterated through and written to a ObjectOutputStream for (BufferedImages i :…
BMac
  • 87
  • 2
  • 9
0
votes
0 answers

Creating Thumbnail for TIFF image in JAVA

Possible Duplicate: Can't read and write a TIFF image file using Java ImageIO standard library Can someone please help with some code for creating a thumbnail for a TIFF in Java. Using this Post have created thumbnail for JPEG and PNG. I have…
Selvanayagam
  • 73
  • 1
  • 11
0
votes
1 answer

Using cache using ImageIO static methods

I need to download file from a given url, but the thing is I can get files with no extension. In order to figure out what the extension is I wrote the following service: public String getExtension(String imageURL){ InputStream stream =…
Noam
  • 3,049
  • 10
  • 34
  • 52
0
votes
1 answer

RGB accuracy problems with bufferedImage

We find that there always exists some RGB accuracy problems whlie getting RGB from a jpeg file using bufferedImage in Java(ImageIO.read(file)).. Does anyone know some alternatives solutions?
ygnhzeus
  • 367
  • 1
  • 2
  • 14
0
votes
3 answers

JAVA: How can my two apps access the same file?

I've made two apps designed to run concurrently (I do not want to combine them), and one reads from a certain file and the other writes to it. When one or the other are running no errors, however if they are both running a get an access is denied…
jersam515
  • 657
  • 6
  • 22
0
votes
1 answer

Java ImageIO.read() fails in browser

I've made a game in Java, which naturally uses multiple images in it. I developed the game using Eclipse, and running it in Eclipse has no problems. At this point, the game is pretty much done, so I'm trying to put it on the internet, but I cannot…
Doug
  • 387
  • 2
  • 10
  • 20
0
votes
1 answer

ImageIO.Read not working most of the time?

I want to display an image from a URL Java using swing. I use this code: BufferedImage pic = ImageIO.read(new URL("http://www.swpc.noaa.gov/SWN/g_curr.gif")); JLabel label1 = new JLabel(new…
derp_in_mouth
  • 2,003
  • 4
  • 15
  • 17
0
votes
2 answers

importing error with import javax.imageio.ImageIO;

I am new to Java and are trying to display an image. I got code on the net but when trying it I get an error with the importing of " import javax.imageio.ImageIO;" The error message reads "javax.imageio.ImageIO" is either a misplace package name or…
user1492069
  • 11
  • 1
  • 4
0
votes
2 answers

AccessControlException in Java Applet

I have created an applet within a web page, but whenever I run it, I get this: Exception in thread "Thread-13" java.security.AccessControlException: access denied ("java.io.FilePermission" "defensebg.png" "read") at…
Cg2916
  • 1,117
  • 6
  • 23
  • 36