Questions tagged [imgscalr]

imgscalr is a small, fast Java library using Java's best-practices for image manipulation and providing simple static-method implementations of a handful of core image manipulations (e.g. resize, pad, rotate, crop, etc.)

imgscalr was written and is maintained by Riyad Kalla. It is released under the Apache 2 open source license and is used in a number of commercial applications.

imgscalr was originally written and released in response to seeing the same questions about "good looking thumbnails in Java" and seeing many different ways to accomplish the same thing; some solutions being better than others.

imgscalr took all the best-practices (lowest memory overhead and fastest performance) and rolled them into a single, simple class that exposes a number of static methods that any caller can use to manipulate images.

The popularity of the library grew and the addition of a few other utilities continue to be added as long as they meet the criteria of "being simple to understand and use".

35 questions
2
votes
1 answer

how to add text to image using imgscalr

I want to add some text to image. and I'm using imgscalr. I'm looking for some examples or tutorials. in case you know some better java based image library, please do let me know. thanks!
Java Spring Coder
  • 1,017
  • 3
  • 12
  • 20
2
votes
1 answer

Scale large images using Java and AsyncScalr

I'm using AsyncScalr in a Servlet to scale down some large images (~ 10-15 MegaBytes), the actual resizing process takes about 40ms which is not much. The overkill comes from Reading the Image from Local Storage as a BufferedImage. so the times are…
hoomb
  • 649
  • 2
  • 12
  • 24
1
vote
1 answer

Java Scalr resize image corrupted file

I'm trying to resize PNG images, convert them to data URL and then download them in frontend. The whole process works just fine but when I try to open the file (for example) in Photoshop I get "unexpected End of file (EOF)". This only happens when I…
m3_
  • 95
  • 1
  • 8
1
vote
2 answers

How to resize Image in Java with same or lower DPI

I am trying to resize jpg Image files in Java. For this I am using Scalr. I have around 16MB image with 6000x4000 Resolution and 350 dpi. When I resize it to 4500 width, it downscales the DPI also to 96. This is the code I am using: …
Hemant Sisodia
  • 488
  • 6
  • 23
1
vote
1 answer

Scalr image resize changes background color on output

I am using Scalr to resize images. I have a problem with some images. Scalr is changing the color of the resized image. In short, this is the outline of my code. I read the file from byte array: BufferedImage image = ImageIO.read(bis); Then I…
mejas
  • 297
  • 1
  • 5
  • 17
1
vote
2 answers

Image is in landscape instead of portrait mode after scaling

I have an image and want to scale it down using imgscalr [1]. The source image's size is 1836 x 3264 (so it's portrait mode) and destination resolution is 1336 x 768. The failure is that the image is in landscape mode and not portrait mode anymore…
Allipon
  • 57
  • 3
  • 13
1
vote
1 answer

Image quality issues using Java library imgsclr to RESIZE

I have a problem with quality when I try only to RESIZE an image to a specific width and height using imgsclr 4.2(http://www.thebuzzmedia.com/imgscalr-3-2-released/comment-page-1/#comment-650387). I have an image which 240X320 and I have to resize…
WowBow
  • 7,137
  • 17
  • 65
  • 103
1
vote
2 answers

Determine the size of an image using ImgScalr

Hi I am currently using ImgScalr library and I have few markers to download images from an HTML document , however sometimes the images are of low quality,and if they are then I need to scan thru the html source to download all the images and use…
user1965449
  • 2,849
  • 6
  • 34
  • 51
1
vote
2 answers

which formats are supports by imgscalr library?

I want to show for users scaled images to reduce internet traffic between client and server. To resolve my problem I've found library with name imgscalr At github page write that this library bad support gif. I couldn't find list of supported…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
1
vote
1 answer

Scala Lift - How to use 3rd party JAR files in project

I've done this before but can't seem to remember what folder to create or where to put jar files. I'm attempting to include an independently developed JAR file into my Lift project, so I can do: import org.imgscalr._ And use it etc. Any help much…
jahilldev
  • 3,520
  • 4
  • 35
  • 52
0
votes
1 answer

Does TwelveMonkeys provide image crop functionality?

I'm trying to use the TwelveMonkeys Library to in image manipulation; but cannot find a method similar to the org.imgscalr.crop(BufferedImage src, int x, int y, int width, int height, BufferedImageOp... ops) which crop the input image according to…
Corrado
  • 23
  • 4
0
votes
0 answers

Cropping an image from URL to InputStream

I need to crop an image from the web (via its url) and return an InputStream (which can be uploaded to AWS S3). I am using org.imgscalr as the library and have the following method: public InputStream cropFile(String url) throws Exception,…
checklist
  • 12,340
  • 15
  • 58
  • 102
0
votes
2 answers

Taking a picture via camera and sending it to server in bytearray

I am working on an Andorid application in which I would like the user to take a picture and then to save it I am sending it over to the server. Now, I am sending the picture as a byte-array to the server. When I try to save the byte-array to a file…
We are Borg
  • 5,117
  • 17
  • 102
  • 225
0
votes
1 answer

Scale Image, then save to DB (Blob)

I have just started using the imgScalr Image Scaling library. I can get the code to scale the images (I'm pretty sure this works). BufferedImage fullImage = Scalr.resize((BufferedImage) ImageIO.read(imageStream), fullImageSize); BufferedImage…
Möoz
  • 847
  • 2
  • 14
  • 31
0
votes
1 answer

ImageIO.read/write slow in Websphere 8.5.5

As a part of my web application, I am using javax.imageio.ImageIO for reading/writing BufferedImage. Initially my app was running on Tomcat 7, and it was running quite fast. Since I've deployed my app to WebSphere 8.5.5 the performance of…
Igor
  • 1,406
  • 2
  • 23
  • 45