1. BufferedImage's getSubimage performance stackoverflow.comI'm working on a Java 2D rendering program (running on 1.6.0_11), which uses external images for its UI rendering. These large images contain several UI graphics parts at the same time, ... |
2. Resize JComponent for file export stackoverflow.comI have a JPanel upon which I draw a number of custom-written JComponents using the usual 'paintComponent(Graphics g)' method. I use a JLayeredPane to control the display order of the ... |
3. Java/Swing offscreen rendering (Cobra HTMLPanel -> BufferedImage) Problem: Component doesn't finish redrawing first stackoverflow.comI'm trying to render the contents of a the Java/Swing Cobra HTML renderer to an offscreen BufferedImage, for use elsewhere in my app:
|
4. BufferedImage.getGraphics() resulting in memory leak, is there a fix? stackoverflow.comI'm having problem with some framework API calling BufferedImage.getGraphics() method and thus causing memory leak. What this method does is that it always calls BufferedImage.createGraphics(). On a windows machine, createGraphics() is ... |
5. Trouble with BufferedImage & ImageObserver in Clojure/Swing/Java stackoverflow.comI've been trying for hours to get my drawing method to work by drawing in a BufferedImage stored in a Clojure |
6. apply filter on selected Area of BufferedImage stackoverflow.comi want apply some Filters on BufferedImage but don't apply these filters on whole of bufferedImage , i need apply filter on Rectangle , ellipse , freehand selection of BufferedImage.anybody have idea ? ... |
7. How do I desaturate a BufferedImage in Java? stackoverflow.comWhat's the simplest way to desaturate a BufferedImage? |
8. Working my way arround repaint() in Java stackoverflow.comI'm planning to write a simple spaceshooter. I have read that the repaint() method is only a request, and it doesn't execute every time it's called. I believe I'm noticing the ... |
9. Resizing BufferedImage stackoverflow.comi would like to resize a BufferedImage that is draw using the Graphics drawing method with AffineTransform object.
|
10. Passing swing screen to another Java application. Does swing update its screen when minimized? stackoverflow.commy question is two folds: Can you pass the screen of one Swing application to another Java program so the latter can act as a "viewer" of the former? Perhaps by passing ... |
11. Using java, how can I make a method taking in a BufferedImage, rotate it, and return a BufferedImage ( with correct width / height ) stackoverflow.comI have been looking up a lot of examples, every time I try, my image becomes offset, and also not rotated by the degree I am looking for. I have a class ... |
12. How to manipulate an indexed BufferedImage? coderanch.com |
13. Scaled BufferedImage woes coderanch.comOkay, here's a tuffy: At work I'm creating an app that displays binary data on a raster display. I am using a BufferedImage to store the raster that I create by hand using information from a byte array (the format of the data and how it is processed is unimportant to the question). Since the user will be looking at data ... |
14. maintain a BufferedImage as it is......... coderanch.comimport java.awt.*; import java.awt.image.*; import javax.swing.*; public class ScreenViewer extends JFrame { public static void main( String[] arg ) { new ScreenViewer(); } public ScreenViewer() { super( "Screen Viewer" ); setDefaultCloseOperation( EXIT_ON_CLOSE ); setSize( 400, 400 ); try { Robot robot = new Robot(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle screen = new Rectangle( screenSize ); BufferedImage i = robot.createScreenCapture( screen ); ... |
15. BufferedImage to System Clipboard coderanch.comYep... it's possible... import java.awt.*; import java.awt.datatransfer.*; import java.awt.image.*; import java.io.*; public class ClipboardImage implements ClipboardOwner { public ClipboardImage() { try { Robot robot = new Robot(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle screen = new Rectangle( screenSize ); BufferedImage i = robot.createScreenCapture( screen ); TransferableImage trans = new TransferableImage( i ); Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard(); c.setContents( trans, this ); } catch ... |
16. How to transfer a bufferedImage Object? coderanch.comHere's some really short examples of this... The client... import java.awt.*; import java.awt.image.*; import java.io.*; import java.net.*; import javax.imageio.*; import javax.swing.ImageIcon; public class ScreenCapturer { private Robot robot; public ScreenCapturer() throws AWTException { robot = new Robot(); } public BufferedImage getScreen() { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle screen = new Rectangle( screenSize ); BufferedImage i = robot.createScreenCapture( screen ); return i; ... |
17. BufferedImage ? coderanch.comall i am attempting to draw a polygon (in this case a pentagon) and have succeeded in getting it drawn and displayed on JPanel. trouble starts when i try to texture it so that the pentagon stands out from the rectangle it is painted on. please help. SEE "// TROUBLE STARTS HERE" comment compiler errors so far are MyPoly7A.java [47:1] cannot ... |
18. Extending BufferedImage coderanch.compublic class CrazyImage extends BufferedImage { public CrazyImage(int width, int height, int imageType) { super(width, height, imageType); } public static void main(String[] args) { CrazyImage src = new CrazyImage(200, 200, TYPE_INT_RGB); CrazyImage dst = new CrazyImage(200, 200, TYPE_INT_RGB); BufferedImageOp op = new AffineTransformOp(AffineTransform.getRotateInstance(Math.PI / 2), new RenderingHints(Collections.EMPTY_MAP)); CrazyImage result = (CrazyImage) op.filter(src, dst); System.out.println(result); } public String toString() { return "I'm ... |
19. Flip/Rotate a BufferedImage coderanch.com |
20. Create BufferedImage coderanch.com |
21. BufferedImage size but not using int coderanch.com |
22. A question about BufferedImage class. coderanch.com |
23. Modifying a BufferedImage in a JComponent coderanch.comI am confused. I have a JComponent whose paintComponent draws a BufferedImage. The constructor just uses ImageIO to read the image ( .gif) from a file. Each color in the image is mapped and known. I have a mouse listener that detects a mouse click anywhere in the image, determines the what the color is, and is supposed to replace every ... |
24. BufferedImage OutOfMemoryError coderanch.com |
25. BufferedImage / getRGB - problem coderanch.comHi, What I want to do is to draw to BufferedImage via Graphics2D, and then copy all image by pixel. What I need is an ability to get pixel's color and it seems to work, but at least not in the way I suppose... There is the piece of code: BufferedImage dc = new BufferedImage(100, 20, BufferedImage.TYPE_INT_RGB); Graphics2D gg = dc.createGraphics(); ... |
26. BufferedImage problem Mac OS X coderanch.com |
27. Canvas to BufferedImage while using Bufferstrategy coderanch.com |
28. BufferedImage versus VolatileImage coderanch.comThanks, thats exactly what I'm looking for. Volatile images seem kind of a hassle... at any moment the VRAM may be reclaimed, meaning if you had a separate thread perform the rendering, you have to instantiate and run it again (though I guess you could have a buffered image snapshot , but I'm don't know about performance issues and trade offs ... |
29. byte[] to BufferedImage coderanch.com |
30. BufferedImage(s) coderanch.com |
31. Save transformed BufferedImage coderanch.comHello community, I want to load an image from the hard disk, then rotate it by 90 and then save the rotated version to another file. However, the following doesn't work: import java.awt.image.*; import java.awt.*; import java.util.regex.*; import java.io.*; import javax.imageio.*; public class ImageRotate { public static void main(String[] args) throws IOException { BufferedImage im = ImageIO.read(new File("C:/a.png")); Graphics2D g = ... |
32. BufferedImage TYPE_CUSTOM to TYPE_INT_ARGB coderanch.comHey all, I'm trying to load a PNG image in that has transparency in it using JDK 1.6 u10 and manipulate the image data (pixels). The problem is if I do this: BufferedImage bi = null; try { bi = ImageIO.read(new File("test.png")); } catch (Exception e) { e.printStackTrace(); } System.out.println(bi.getType()); // == 0 Or this: BufferedImage bi = toBufferedImage(Toolkit.getDefaultToolkit().createImage("test.png")); System.out.println(original.getType()); // ... |
33. Using the IndexColorModel class to create a BufferedImage coderanch.comThanks Rob, i put your idea to the test with a very simple prototype which I include below. It worked fine. You know, the Sun API docs are brilliantly put together on some ways. Everything is so tight, but the downside is that they don't make it easy to figure out little things like "the default is transparent. I mean here ... |
34. BufferedImage drawing problems coderanch.comHello, when i initiate object of Grid it draws the grid, later when i want to clear image or other stuff it doesn't, for ex: clear() function which clears the image doesn't work !, any other function which draws any other stuff on the buffered image doesn't work also public class Grid extends JPanel { int startPositionX = 5; int startPositionY ... |
35. Manipulating a BufferedImage for a dpi related problem.... coderanch.comHi, I am in the process of developing an app in java which takes screen shot on pressing a button on the app. I am getting the screen shot using java.awt.Robot class. Then i am passing the image to system clipboard using java.awt.datatransfer.Transferable object. Now the problem is when i try to paste that image in MS Word 2007, i get ... |
36. how to convert a bufferedImage into a string coderanch.compublic class ComponentAdapter extends MouseAdapter{ protected GlassPane glassPane; protected String action,str1; public ComponentAdapter(GlassPane glassPane, String action) { this.glassPane=glassPane; this.action=action; } public void mousePressed(MouseEvent e) { Component c = e.getComponent(); BufferedImage image = new BufferedImage(c.getWidth(), c.getHeight(), BufferedImage.TYPE_INT_ARGB); Graphics g = image.getGraphics(); c.paint(g); glassPane.setVisible(true); Point p = (Point) e.getPoint().clone(); SwingUtilities.convertPointToScreen(p, c); SwingUtilities.convertPointFromScreen(p, glassPane); glassPane.setPoint(p); glassPane.setImage(image); glassPane.repaint(); [color=green]for(int y=0; y |
37. copying part of a BufferedImage into a Graphics java-forums.org |
38. new BufferedImage OutOfMemoryError: Java heap space java-forums.orgI have client server program that the client send a screen captured image continuously to the server warping the BufferedImage to ImageIcon and then the client will read the ImageIcon and save it to a file via ImageIO.write using BufferedImage. Now the problem is for ever received image a new BufferedImage will be created in the while loop, after 6 fream ... |