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

ArrayIndexOutOfBoundsException while trying to scale

Have been trying to scale down a view to different scale but i'm having some troubles. The context is inside a video player (using VLCJ). This code is being used to scale the image but after the first frame the image stops updating with next image…
Payerl
  • 1,042
  • 2
  • 16
  • 33
0
votes
1 answer

Java: Best way to display multiple buffered images in a horizontal orientation(e.g. film reel)

I have a doubly linked list that's storing a bufferedimage in each node. I can easily retrieve all the buffered images by creating an iterator and iterating through list. I want to display each node horizontally one after the other in some sort of a…
glenn
  • 31
  • 1
  • 4
0
votes
1 answer

Rotating a BufferedImage gives it a black border

I try to rotate a BufferedImage and it works, but the rotated image has a black border around some sides and I don't know why... I also feel like it gets smaller after rotating. import java.awt.image.BufferedImage; import…
ViktorG
  • 505
  • 1
  • 7
  • 30
0
votes
1 answer

Icon from a .lnk file to javafx Image

I'm am trying to get the Icon from a .lnk file, put it into a javafx Image and then save it as a .png file (to ensure it's working). My current code compiles but does not work: import java.io.*; import java.util.*; import…
0
votes
1 answer

Getting Pixel Values from Byte Array

Im having trouble getting pixel data. My program takes screenshots, every loop it will store the previous screenshot. My goal is to do a comparison at the pixel level between the current screenshot and the old one. Ive ran this code which tells me…
user3712476
  • 118
  • 1
  • 11
0
votes
1 answer

Manipulating the Alpha value of BufferedImage

In the code i'm setting the alpha value of a pixel to 100 for entire image and I want the Alpha value to be 100 while reading the image. But at the retrieving part it gives me 255(Default Value) . What is wrong ? and how to solve it ? Any Help would…
0
votes
1 answer

Getting the Node Coordinates of an Event and Reading RGB from BufferedImage Javafx

Hello I am attempting to get the rgb of the coordinates of a click within a scrollpane that displays 5 views of an image. The ImageViews are fitted to the screen size while the original image is about 8k by 4k pixels. Below is my attempt to find the…
0
votes
0 answers

How to extract data from serialized class at server side if serialized class is defined in client side in different project

I created "client" and "server" in two separate projects. I need to send two arraylists and a buffered image from client to server. For this, I created a serialized class "sending_data" which contains two arraylists and buffered image. As…
0
votes
2 answers

How to smooth or process image pixels that represent closed line?

Let me explain my issue. I have a service that does some mathematic calculations ( very very difficult ). It is some sort of statistic calculations. This service returns two-dimensional array of booleans ( boolean [][] 400x400). After i am create an…
0
votes
1 answer

Using a PrintDialog

I have a class that implements Printable. in that class I have a public method that creates a List of BufferedImages with each one printed on one page. Now I want to add a PrintDialog, to allow the user to choose the pages to print and the number of…
Paul Long
  • 1
  • 3
0
votes
1 answer

java BufferdImage dosen´t load

So right now I´m trying to load an Image on my Harddrive in a BufferdImage in my Code. Yet I think I did everything right but my trycatch only leaves the catch. Code for better understanding : private static BufferedImage image; public void…
Gwitninm
  • 15
  • 5
0
votes
1 answer

Java load image to class - most efficient practice?

I am writing a 2D, tile-based game in Java. Characters are to be placed on the tiles according to the game logic. Each Character is associated with a picture that would be drawn to the screen using java.awt.Graphics2D. However, there could be more…
krismath
  • 1,879
  • 2
  • 23
  • 41
0
votes
1 answer

Java - Generate SVG file from a PNG file using SVGGraphics2D

I am currently using SVGGraphics2D to create a SVG file. I was able to have a SVG file as an output by drawing shapes on it but then what I need is to have a bufferedimage - a PNG file, drawn in the SVG document. The following are the current codes…
ACM
  • 11
  • 1
  • 5
0
votes
0 answers

Having issues loading an image from a sprite sheet, am i loading the sprite sheet correctly?

I've been trying to use a sprite sheet that i found online, and use some of the images from it for a small game that i am making. I have looking at tutorials about how to read from a sprite sheet, but when im trying to load the Sprite sheet, the…
pdhk14
  • 43
  • 2
  • 8
0
votes
1 answer

Pixel access of BufferedImage - memory leak?

I want to build histograms from several images. To perform this process, I get access to the DataBufferByte I recognize that the GC doesn't free the memory after building the histogram. What is wrong with this code? import java.awt.Color; import…
501 - not implemented
  • 2,638
  • 4
  • 39
  • 74