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
8
votes
1 answer

imgscalr with background red

I'm using (org.imgscalr.Scalr) libraries to resize some images, but when after resizing the background turns red . My code is: BufferedImage imagemPng = ImageIO.read(image); BufferedImage imagemJpg = Scalr.resize(imagemPng, Method.QUALITY, 1920,…
6
votes
1 answer

Dynamically resize a bufferedimage in java

I tried resizing the buffered image using AffineTransform as well as Scalr.resize Here are my codes for both of them. using Scalr.resize: BufferedImage buff = robot.createScreenCapture(new Rectangle(bufx,bufy,bufwidth,bufheight)); // x-coord,…
6
votes
2 answers

Pink/Reddish tint while resizing jpeg images using java thumbnailator or imgscalr

I am trying to convert an image (url below) using two libraries (thumbnailator and imgscalr. My code works on most of the images except a few which after conversion have a pink/reddish tint. I am trying to understand the cause and would welcome any…
rohtakdev
  • 956
  • 1
  • 13
  • 16
5
votes
2 answers

How to set crop starting position with imgscalr?

I have tried to use imgscalr library with the following crop method: Scalr.crop(image, height, width); But it always crops starting at the left upper corner of the image. Can I tweak this behavior to start in the right bottom corner or center?
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
4
votes
3 answers

How to use imgscalr using Grails

I've just begun using Groovy and Grails the last few days. I don't have any prior experience of Java, so you'll have to excuse this (probably) very basic question. I've searched Google and Stack Overflow and haven't found anything that helps me with…
Gareth Lewis
  • 751
  • 2
  • 15
  • 36
3
votes
2 answers

Sample code for imgscalr AsyncScalr

Can someone please share sample code of imgscalr using AsyncScalr for resizing code? I am trying to use imgscalr (Scalr class) for image processing. It is a good and easy to use library, however, gives OutOfMemoryException too often. I am hoping…
DEREK N
  • 965
  • 1
  • 8
  • 11
3
votes
1 answer

Best resolution resizing image using ImgScalr

I am very new to ImgScalr API.I need to resize my images to different views, one of them being a mobile view and second a thumbnail view. I have made use of the resize method, but have a doubt. Which is the best of the resize method to resizing the…
ayan_2587
  • 833
  • 2
  • 11
  • 21
3
votes
1 answer

Android How to use Scalr 4.2 or 'java-image-scaling' for HQ thumbnails

I'm trying to create high quality thumbnails, have tried most-if-not-all methods with Android and not yet satisfied. Here is a good post I found, in which I would like to try using Scalr or 'java-image-scaling' library for Android. Here are Scalr…
jerrytouille
  • 1,238
  • 1
  • 13
  • 28
3
votes
1 answer

Resizing .tif image with imgscalr

I am trying to resize a .tif image and then display it on the browser by converting it to a base64 string. Since ImageIo doesn't support TIF images by default, i have added imageio_alpha-1.1.jar(got it here -…
vijay tyagi
  • 2,226
  • 3
  • 20
  • 31
3
votes
2 answers

PNG with transparent background turns black when resized with Scalr

I am using org.imgscalr.Scalr(http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/#solve) libraries to resize the images but the PNG with transparent background turns black when resized. My code is as mentioned below: public…
Abhishek Dhote
  • 1,638
  • 10
  • 41
  • 62
2
votes
5 answers

How to resize images in a directory?

This code attempts to resize images in a directory called "imgs". Unfortunately for some reason when I uncomment the listFiles(..) loop ImageIO.read(sourceImageFile) will return null. Yet processing the same file straightaway outside the loop…
simpatico
  • 10,709
  • 20
  • 81
  • 126
2
votes
1 answer

Base64 trimming my thumbnail image

I have some issues that I am having a hard time solving. I made a short code snippet : BufferedImage image = ImageIO.read(new ByteArrayInputStream(payload)); BufferedImage thumbImg = Scalr.resize(image, Method.QUALITY, Mode.AUTOMATIC, WIDTH,…
A. Gesta
  • 68
  • 7
2
votes
1 answer

Scalr resize and crop to size

I would like to show an image in all sort of placements with different width and height. I am using a method for crop and resize with Sclar, But I have 2 problems: The result doesn't look so good in some cases. I think it is because the image in…
bashan
  • 3,572
  • 6
  • 41
  • 58
2
votes
1 answer

ImageIO support for raw images (jrawio)

I was looking for raw image support and found this library (jrawio-1.6.1) which extends imageio to add raw support. It seems to work but awfully slow. I've seen snails that were faster. My code processes Jpegs in seconds and it takes minutes to…
Codeguy007
  • 891
  • 1
  • 12
  • 32
2
votes
1 answer

Image resizing using imgscalr API in java

How to convert Buffered image into a file object. My function actually needs to return a file object . The imgscalr resizing function returns a BufferedImage after resizing.so How to convert it into a file object.
1
2 3