• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to compress a image toke from Screen (code avaiable)  RSS feed

 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys! Im creating a program where I need to send a byte array over the internet, this byte array is created from a BufferedImage. My code IS working perfectly but I need to reduce the quality of that image to send it faster, my code is:

This code create a byte array "dados" with all bytes of that image but I want to reduce the number of bytes compressing that png. How can I do that ? That compression CAN lose some quality, so what I need is for example tranform that PNG to a grayscale or less color etc, but without saving to disk.

 
Carey Brown
Saloon Keeper
Posts: 3329
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This tutorial might help
JPG Compression
 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carey Brown wrote:This tutorial might help
JPG Compression


Humm nice tutorial! Thank you!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!