|
-
maintain image quality after scale
Hi, i've got images(img1.png, img2.png, etc) that contain barcode. then i join 2 images (and scale it down because the real barcode image is quite large) into JPanel using buffered image to draw my image. i also used interpolation to enhanced my graphic. but after combine image and reproduce it to a file(now contain 2 image), the barcode can't be scan. i think that it's because of graphic problem. any solution to enhance or maintain the quality of image after being load in buffered image and scale(i scale it to 0.4)?
here is my code:
g2d = bi.createGraphics();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
//g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
g2.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
ImageIO.write(bi, "png", new File("out.png"));
g2.drawImage(bi, null, 0, 0);
Thanks and Regards,
John
Similar Threads
-
By James Graham in forum .NET
Replies: 4
Last Post: 10-23-2011, 02:47 PM
-
Replies: 1
Last Post: 10-28-2005, 09:57 PM
-
By rechmbrs in forum Java
Replies: 0
Last Post: 07-11-2005, 09:41 PM
-
By Slatibartfast in forum VB Classic
Replies: 1
Last Post: 06-02-2005, 04:08 PM
-
Replies: 3
Last Post: 08-30-2001, 11:45 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks