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
-1
votes
1 answer

Display BufferedImage on JPanel

I need to display BufferedImage on a JPanel with Netbeans. I add the panel using Netbeans' drag and drop. Then I added code to display the image on the panel. Here is my code: BufferedImage img = null; try { img = ImageHelper.loadImage(path); }…
CherryBelle
  • 1,302
  • 7
  • 26
  • 46
-1
votes
1 answer

Why does the program not enter the loadImage() Method?

The goal of this little program is to load an .jpg image and display it in a Canvas class extended by JPanel, which is displayed in a JFrame object in the Main class, like so: The Main-class package imageloader; import…
-1
votes
1 answer

How to open tiff file and remove the header part

I'm writing a java program to convert the tiff files to separate images , However I'm not able to use ImageDecoder as my tiff files doesn't contains II* as the starting , My tiff file starts with some header then the images starts with II* . Please…
Vinoth
  • 63
  • 4
  • 23
-1
votes
1 answer

ImageIO not finding the image

I'm making a game where you fight a stick guy, and I'm already having errors trying to paint the background image. Here is my code: (I'm actually the worst with these code block things, it's not pasting right for some reason, here's a pastebin:…
Joey402
  • 3
  • 4
-1
votes
1 answer

Image IO Write not writing

basically I am trying to save an image I have edited in a JFrame, so I have a menu with the save item and I have an action listener to set up for the save item and everything works fine, the file chooser comes up and I can select where I would like…
Elchapo
  • 69
  • 1
  • 3
  • 13
-1
votes
1 answer

Need to illuminate 20-pixels from top, bottom, right and left of an image and then I need to compare pixel values

I need to determinate whether the given image is blank or it has the same pixel values please find the below code. here I want to set a tolerance. I don't want to pass top, bottom, left and right 20 pixels to this logic. please help! for (String pic…
Maniraj Mkr
  • 143
  • 1
  • 2
  • 12
-1
votes
1 answer

Java's drawImage method doesn't show the image

I'm just beginner at Java Programming and am using NetBeans. The code below runs and No Error is displayed but no image is seen! This image is in the "frame" package beside this two classes. package frame; import javax.swing.JPanel; import…
-1
votes
1 answer

new URL().openSteam() method returns null when passed to ImageIO

Currently trying to pass an InputSteam to Java's ImageIO by providing a URL().openStream(). val sourceIO = new URL(fileName).openStream() val bufferedImage = ImageIO.read(sourceIO) I am testing around 100 different images. I know each image exists…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
-1
votes
1 answer

How to write PNG binary data to PNG file in JAVA

I am trying to take a screenshot of a page using HTML2Canvas. I am getting the binary in base64 using canvas.toDataURL() and I send it back to Java. I use the following JavaScript code which executes when I click a…
Dimitrios Efthymiou
  • 535
  • 1
  • 5
  • 17
-1
votes
1 answer

image read and write java.lang.IllegalArgumentException

i want to create a very simple encrypt/decrypt project. but at first i want to read jpg file and write it to a file with a given password then read that file again and check the password in the file and the provided password but i get: Exception in…
mmlooloo
  • 18,937
  • 5
  • 45
  • 64
-1
votes
1 answer

android Image encryption/decryption BufferedImage and ImageIO not resolved

Code given below ,is not working with the android sdk "BufferdImage and ImageIO " not resolved . I've tried to implement "Bitmap" and "BitmapFactory", but it did not work.Please help me to do this at android application . Please correct in for an…
Anupam
  • 11
  • 5
-1
votes
1 answer

JAVA Using ImageIO.read and paintComponents()

I programmed a class, which helps me to get 32x32 images from a large one. But I have a problem. My class looks like this: package tool; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import…
-1
votes
2 answers

Url unable to open stream on image on atspace web server

NOTE:I apologize if this is a stupid question, I am new to web server interaction, and I have yet to find any useful information online to help with this issue. I am trying to install an image off of a web server using the following code: public…
csga5000
  • 4,062
  • 4
  • 39
  • 52
-1
votes
2 answers

Invert image after streaming from url is not working in servlet java

I want to invert image after image get streamed from given url in servlet, but its not working. But it giving me same image as it is when i send parameter invert=true in url to this servlet and giving me exception NullPointerException at below line.…
Kammy
  • 409
  • 1
  • 7
  • 26
-1
votes
1 answer

JAVA - JWJGL - IO Error: Input == Null

I Keep Getting this when trying to load a texture from "/res/texBrick.png": Exception in thread "Thread-0" java.lang.IllegalArgumentException: input == null! at javax.imageio.ImageIO.read(Unknown Source) at…
Coppyhop
  • 23
  • 6