Questions tagged [image-resizing]

Image resizing is the downscaling or upscaling of an image. Dozens of algorithms exist, all with performance vs. quality tradeoffs.

Image resizing (also called image scaling) is the downsampling or up-sampling of an image using an interpolation algorithm. Common downscaling algorithms are Lanczos, Bicubic Sharper, Bicubic Smoother, Fant, Bicubic, Bilinear, and NearestNeighbor (listed in order of average result quality). Fractal algorithms often produce better results for upscaling photos, while there are many algorithms optimized for upscaling pixel art.

Due to algorithmic complexity, most developers use library implementations of these algorithms.

FreeImage

Offers CatmullRom, Lanczos3, bspline, box, bicubic, and bilinear filters. FreeImage focuses on implementation simplicity, and doesn't use hardware accelerations or SIMD extensions, so these speeds may not be acceptable for real-time display of images.

Windows GDI+

While loathed by many, GDI+ does include an excellent 2-pass Bicubic filter. It offers: 2-pass Bicubic, 1-pass bicubic, bilinear, and nearest neighbor. Those using it should be aware that it may add rings to images unless WrapMode is set to TileXY, as otherwise the algorithm samples data from outside the image bounds.

WIC (Windows Imaging Components)

The IWICBitmapScaler class offers Fant, 1-pass bicubic, bilinear, and nearest neighbor. Implementations are optimized for performance, and can be 2-4x faster than their GDI counterparts, although there isn't currently a 2-pass bicubic filter such as offered by GDI+

2188 questions
0
votes
1 answer

Resizable background image in DIV with position relative elements inside

I'm developing an aplication which has boiler room schema like this one. https://www.solarfocus.com/website/var/tmp/image-thumbnails/0/390/thumb__product-detail-fancybox/schema_elegance_01.jpeg I would ike that image is always taking 100% width but…
Jan Keber
  • 327
  • 1
  • 2
  • 8
0
votes
0 answers

GD library with multiple image formats

I'm using a gd library script to resize images that are uploaded. All images that are uploaded are renamed with a .jpg extension. When the original images is .jpg or .jpeg, I can see the image and resize it without any issues. But when the…
mcmuney
  • 1
  • 1
0
votes
2 answers

Postscript display problems

I have a postscript image that was properly displayed in Windows with gsview, but when I view it in Ubuntu or Mac, I get only the second (last) page. I have tried a lot of applications(evince, Okular) and ways to properly open it but either the 1st…
eva_thess
  • 101
  • 1
  • 1
  • 7
0
votes
1 answer

Autolayout proptional constrain not working properly iOS

I have one bug in which proportional constrain not working properly My image view size is 220 * 176 in 5S devices I want height and width proportionally in bigger devices Image size will be 1280 * 1024 which is coming from backend, i tried but in…
0
votes
1 answer

Image resampling on 3-channel thats not padded to 4 bytes?

I found an image resampling algorithm that produces an extremely nice image when down-sizing. It works on a 3-channel image that's padded to 4 bytes per pixel. What do i change to make this work for a image that's not padded to 4 bytes per channel?…
b.sullender
  • 163
  • 1
  • 16
0
votes
1 answer

Carrierwave creating all versions of images

I have carrierwave and minimagick installed and im trying to resize the image if its portrait or if its landscape, ive followed the carrierwave documentation but something is not working and it is creating both portrait and landscape images. Ive…
john seymour
  • 213
  • 1
  • 12
0
votes
1 answer

Magick.Net Image FileSize is always Zero

I am working on requirement where during upload image from user on ASP.net form, I need to check if user provided image is greater than 500kb then I don't need to reduce the size of the image if it is above the size then reduce the size of the image…
0
votes
2 answers

limit filesize if uploaded images with laravel

The client asked me to limit the photos size uploaded by users to 1MB max .. I am using laravel 5.4 first, when I use $image->save() the size is automatically decreased and I don't know the reason second, is there a way to target the file size not…
Omneya el-meligy
  • 103
  • 1
  • 1
  • 14
0
votes
1 answer

Image Resizing Service [Rails 5]

I'm building a project about Uploading image and resizing them, for the moment we are using gem FastImage which is perfect for getting image url. But i can't find any Resizing Gem. What i want! Get size of that image Get width Get height Resize…
egzonmustafa
  • 115
  • 5
  • 13
0
votes
1 answer

image resize without memory

i have implemented a few years ago an algorithm for resize image in and i forgot the name of it - i would be very happy if someone could remind me this name. the method is to look on the input image center and on the output image ( thos that we want…
ItamarE
  • 41
  • 4
0
votes
2 answers

How do I use cvResize/resize correctly?

I have trouble resizing a 6x6 image to 120x120. It looks like the resized image is somewhat shifted by 1 pixel. This happens with the cvResize and with cv::resize. My code looks like this: warpPerspective(greyImg, warpedImg, homography, Size(6,…
binford
  • 1,655
  • 1
  • 18
  • 36
0
votes
1 answer

CSS how to maintain image size without cropping

I am trying to have image display without cropping. These are the code sections I have tried manipulating without success. I also searched stackoverflow and W3 schools for variations but I'm not getting closer so believe my approach is flawed.…
0
votes
1 answer

error: C:\projects\opencv-python\opencv\modules\imgproc\src\imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize

I have a error as mentioned in the question in the below code for resize function of cv2. I have referred here error: (-215) ssize.width > 0 && ssize.height > 0 in function resize But I think the image is correctly loaded. So I would appreciate some…
Gayathri
  • 140
  • 11
0
votes
1 answer

Resize and Rotate Rectangle by using its line touch event

Move rectangle on finger touch event and also Resize rectangle by moving it left ,right, top or bottom line finger touch and rotate it when I touch or move on bottom right corner of the rectangle(show in figure) and redraw it (canvas) android please…
0
votes
3 answers

Laravel 5.4 Error: NotReadableException: Image source not readable

I'm trying to create multiple copies of profile pic in different sizes when a profile is created. But I am constantly getting this error: " NotReadableException: Image source not readable" Can somebody point me what I'm missing in my below…
chuck
  • 125
  • 3
  • 16
1 2 3
99
100