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

HTML Text to Image and saving as blob to Database

I have converted the rich text to image and saved as a blob to db. Blob is created fine from local server (WINDOWS) but when deployed to application server (LINUX). The image format(font, sharpness) got changed. I am not sure what I have to do.…
Harish
  • 425
  • 3
  • 7
  • 19
0
votes
1 answer

exception: I/O error reading PNG header! for image reading size

This is my code: private Rectangle getImageUriImageSize(String uri) { Matcher matcher = dataUriPattern.matcher(uri); if (!matcher.find()) return null; byte[] bytes = DatatypeConverter.parseBase64Binary(matcher.group(2)); …
mark
  • 727
  • 3
  • 14
  • 35
0
votes
1 answer

How to resize drawing area dynamically via Java?

I'm trying to resize my BufferedImage (my drawing area) without losing drawn figures on image and resume to draw after resizing.(Like in Paint.NET) I'm doing this with JSplitPane from edges and it's happening but when I want to resume to draw, the…
Coder ACJHP
  • 1,940
  • 1
  • 20
  • 34
0
votes
1 answer

BufferedImage resize algorithm

i cant find any solution for my problem, hope you can help me. I have a Buffered image (e.g. img), und i want to resize it (with its array of pixels) to fit exactly 100px (100 x 100). All the solutions i found are just for "stretching" the image…
Mechamod
  • 21
  • 8
0
votes
0 answers

I converted BufferedImage to Base64 but How I convert it to Image again?

I converted BufferedImageto Base64 format. How do I now convert this Base64 string to Image again? I always get an error: image == null try { BufferedImage bimg; Robot bot; bot = new Robot(); bimg = bot.createScreenCapture(new…
Br.GH
  • 27
  • 1
  • 8
0
votes
1 answer

Java application closes after BufferedImage without throwing exception

I have a weird problem that I can't even determine the logic behind, let alone how to fix. I have a screensaver app which I'm writing on NetBeans on a Mac. I'm now trying to port the code to work on a Windows 10 machine. The app runs, but seems to…
Guy Stimpson
  • 87
  • 11
0
votes
1 answer

Java BufferedImage: Calculate Memory Size in Advance

I am currently developing a Web Service that has to convert PDFs to images, downscale these images and split each scale into different tiles. For most of our users data the image sizes are not to large and the whole process fits into memory. But…
SakeSushiBig
  • 1,481
  • 2
  • 14
  • 20
0
votes
1 answer

Drawing a line over an image in java

So I have a panel that has an BufferedImage in it, and I would like to draw a line over that image, overlapping it. I have tried the following example that I found from google but it doesn't seem to work: public class Main { private JFrame frame =…
Commongrate
  • 123
  • 1
  • 12
0
votes
1 answer

Loading images and data from a text file and appending to it (Java)

I've created a platform game where each type of game object is assigned to specific rgb values so I can create levels by drawing them out in paint and loading the image. Right now I have the first two levels already loaded and I am able to get the…
0
votes
1 answer

Why does copy and paste of images on OSX now return sun.awt.image.MultiResolutionImage in Java 8

Copy and paste of images from web browser (Firefox, Chrome and Safari) stopped working on my OSX machine, it is ok on PC. I tracked it down to the fact that I expected data with the flavor of image/x-java-image;class=java.awt.Image to always be a…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
0
votes
1 answer

Java: drawing scaled objects (buffered image and vector graphics)

I would like to draw scaled objects containing raster as well as vector data. Currently, I am drawing into a scaled Graphics2D object protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D)…
justik
  • 4,145
  • 6
  • 32
  • 53
0
votes
0 answers

Testing an imageeffect using a bufferedimage

Ive made a class that applies a tiling effect to a bufferedimage and i have to make a JUnit test on the class but im unsure of what to test and how i can test it. I know i have to use assert and the likes but im not sure how. I was thinking it…
MoeTheBro
  • 11
  • 3
0
votes
1 answer

How to create a BufferedImage from data recived over serial port

I'm working on a project in which I have to get image from camera (cmucam4) which is connected to my computer with Xbee. The probleme is that I can get the image data over the serial port, but when I save it as a file, the file can't be openned as…
NYoussef
  • 13
  • 1
  • 5
0
votes
1 answer

Issue with downcasting Picture

I am stuck with a downcasting issue with java. Here is the plot: The class MyPicture extends the abstract class BufferedImage. The point is to add a few methods to BufferedImage. Then, I have the class MyWindow which sets a user-friendly window. In…
Peyret
  • 3
  • 1
0
votes
1 answer

BufferedImage loses alpha when passed as a parameter

I'm having a problem where images loaded in as a buffered image contain their alpha channels correctly. But when passed as a parameter the alpha channel is lost. I load the images in like this: MousePointer =…
Timothy Eckstein
  • 307
  • 1
  • 2
  • 10