I'd appreciate any hints, suggestions, or answers.Īside from mixing floating point and integer arithmetic, I suspect you're getting numeric overflow / underflow with some of your intermediate values. I've been going over the interpolation code, and I can't see what I'm doing incorrectly. However, for certain other destination sizes, such as 100 x 73, the destination image is distorted: For example, if the original bitmap is 500 X 366, and the destination size is 250 x 183, the algorithm works perfectly:
#Best image resizer cubix code#
This code works perfectly for certain destination sizes. Out = a0 + a1 * dy + a2 * dy * dy + a3 * dy * dy * dy Unsigned char d3 = get_subpixel(bmap, idx, x + 2, k) - a0 Unsigned char d2 = get_subpixel(bmap, idx, x + 1, k) - a0
Unsigned char d0 = get_subpixel(bmap, idx, x - 1, k) - a0 Unsigned char a0 = get_subpixel(bmap, idx, x, k) Std::vector out(dest_width * dest_height * 3) Ĭonst double tx = double(bmap_width) / dest_width Ĭonst double ty = double(bmap_height) / dest_height Ĭonst std::size_t row_stride = dest_width * channels įor (unsigned i = 0 i < dest_height ++i)įor (unsigned j = 0 j < dest_width ++j) Std::size_t channels, std::size_t dest_width, std::size_t dest_height) Std::vector& bmap, std::size_t bmap_width, std::size_t bmap_height, Here, bmap is a vector containing the bitmap data, and get_subpixel is simply a function that treats the bitmap as a 3D array composed of X x Y x Channel pixels, and returns a single sub-pixel at the specified coordinates. The following is my simple implementation. I'm familiar with how bi-cubic interpolation works, and I've used both the Wikipedia article and existing implementations as a guide towards coding my own version. All rights reserved.ĭzSoft® and the DzSoft logo are registered trademarks of DzSoft Ltd.I've been attempting to code a Bi-Cubic resize algorithm for in-memory bitmaps. We made no compromise on quality and use the finest image resizing algorithm we ever found. Transparent GIF and alpha-channel PNG logos are supported along with BMP and JPEG formats.Īnd by the way, the word "quick" in Quick Image Resizer's name means how quickly you can do things with it, it's not about the speed of its image processing algorithm. Also, it is possible add a custom logo or watermark to the images. The program can automatically choose a JPEG Quality/Compression level for each image to best fit the file size that you selected. It's quick like never before! Just drag into the window, and then out
Message, upload to your web site, copy to a CD etc). Wherever you like (to a folder on your computer, into a new email Image file from the right part of Quick Image Resizer
Special control below the blue drop target. Immediately processed with the settings that can be selected using the The blue drop target of Quick Image Resizer. To process a photo with Quick Image Resizer, just dragĪnd drop it from any folder of your computer (or from the desktop) into
#Best image resizer cubix for free#
I love the watermarkįeature, PNG/Alpha watermarking is something I thought only Photoshop wouldĭownload and try it for free for 30 days: What I've been looking for to manage my gallery. I have used Quick Image Resizer to put a photo gallery up onīest job of batch resizing images that I have found so far. I don’t purchase much or try many things off the internet, but this product really makes this whole internet thing worthwhile. You simply select a resizing scheme and drag images to the program's window. Quick Image Resizer offers an ingenious way of processing your images. Normally, you need to resize your digital photos or other images before uploading them to the Web or sending via e-mail. Quick Image Resizer - Resize your digital photos and JPEG images