Questions tagged [bufferedimage]

The Java class BufferedImage is used to read and manipulate images and assist in double-buffering in desktop GUI applications.

The java.awt.image.BufferedImage Java class is part of the Abstract Windowing Toolkit group of classes that form part of the standard JDK.

The BufferedImage class contains methods to manipulate pixel values and is also used for double-buffering in applications that have a Java Swing GUI.

2150 questions
0
votes
0 answers

How to update BufferedImage with keyStroke

Currently i'm loading images in a 2D ArrayList, but now i want to update the same image when the user pressed the 'W' key. I'm using Keybindings to check what the user presses, the System.out.print does work so why won't the image update? Player…
djamaile
  • 695
  • 3
  • 12
  • 30
0
votes
1 answer

Get RGB of JPG in Android

first of all thank for your time. I have a jar library which would be included as library in my Android Application. This jar, among other things, is able to get the RGB values from a jpg image. This works perfectly in my java application but when I…
0
votes
2 answers

Converting JPanel to Image to be added in iText PDF with white or transparent background

I am trying to convert a JPanel to Image and will be writing it to a PDF using iText. I have searched ways on how to convert JPanel to Image and found two "Working" solutions. private BufferedImage createImage(JPanel panel) { int w =…
0
votes
1 answer

Printing to console updates visuals? - Java

For a college project I was tasked with making an adventure game in Java. I have used threads and the swing library among other things, but now I have encountered a problem. // The following is in the constructor of a subclass of…
Alexz
  • 85
  • 1
  • 1
  • 10
0
votes
1 answer

sRGB IEC61966-2.1 ColorModel for Raster image

I need to convert JPG images provided by customers to sRGB format (sRGB IEC61966-2.1) to make them ready for web. I can do it successfully with ImageIO and BufferedImage but this operation is really slow: val srgbSpace =…
omnomnom
  • 8,911
  • 4
  • 41
  • 50
0
votes
0 answers

Adding JLabel to JFrame with JLabel Background

I have spent two days trying to figure out how to add a JLabel to my JFrame when I already have a JLabel added as the background. I created a Container with the getContentPane() method, and I've added the background JLabel (which sows up fine), and…
0
votes
1 answer

Loading Buffered Image to JLabel in JScrollPane

I'm Java beginner trying to load a .PNG 8356 x 5092 pixels into a JFrame 720 x 600. I can load the image but it is zoomed to the top left, wanting to make the .PNG fit into the JFrame and then be able to span with the mouse click and zoom with mouse…
0
votes
0 answers

How to read tiff files of size 3 GB in hadoop

Currently I am working on an image processing project in which I need to extract features from the tiff images of size 3 to 4 GB. I tried reading the file using BufferedImage and ImageIO, but tif format is not supported by them and thus null…
Isa
  • 1
0
votes
1 answer

Images in apache POI XWPF document have color distortion

I am attempting to design a report template which has many(hundreds of) images being referred to by hyperlinks. I want the document to be under 25Mb (for email and other reasons), so I'm trying to compress the images using the following code: //I…
0
votes
1 answer

How can I encrypt a BufferedImage to only be read by the program?

I have this method here in a class named Buffers: private static BufferedImage load(String s){ BufferedImage image; try{ image = ImageIO.read(Buffers.class.getResourceAsStream(s)); return image; …
Dormin
  • 23
  • 1
  • 6
0
votes
0 answers

Loading a buffered image into a jpanel

I'm having issues loading images into my program. I have tried to research and trouble shoot as much as I can but I'm at a dead end. I know that my code for loading the image is close but there is some strange arrayoutofboundsexception that is…
0
votes
1 answer

Incorrect grayscale values from Java BufferedImage Raster

I have a grayscale height map, which I created in Photoshop, and I need to pass it to a Java program for processing. I am loading it by using the ImageIO.read(...) method and then converting it to grayscale with this code: BufferedImage map =…
0
votes
1 answer

Only drawing part of bufferedimage

I'm designing a card game and I want to draw (paint) a card onto a panel. When I paint, though, only a tiny portion of the image is showing. You can sort of see it in this screenshot: I wrote a wrapper class (CardImage) for a BufferedImage: import…
Billy
  • 357
  • 1
  • 5
  • 14
0
votes
1 answer

BufferedImage set alpha from other BufferedImage

I got 3 BufferedImages: A, C and D. All are images with colors and an alpha channel. C has to alpha-over D, but with the transparency layer of A. The idea is to: Set the alpha channel of C to that of A Alpha over them I do the alpha mixing with…
piegames
  • 975
  • 12
  • 31
0
votes
1 answer

Simple way to provide a scrollable image view (waveform) in Java without using ImageIcon?

Is there a Java-only way to show larger pictures in a JScrollPane? I don't want to reinvent the wheel and I'm already struggling at showing 32768x400 images using the ImageIcon in a JLabel trick because there seem to be limits regarding the…
user1050755
  • 11,218
  • 4
  • 45
  • 56