Is there any scaling method to resize with samplin
BlitzMax Forums/BlitzMax Programming/Is there any scaling method to resize with samplin
| ||
Is there any scaling method in MAX to resize an image with inteligent re-sampling? I need to make some (quality) thumbnails from like 3000 images. Speed not an issue as its a batch-render process, not a game. |
| ||
I think there is only MIPMAPPED (flag, Used when loading an image), you could always scale buy averaging the pixel values using a TPixmap which gives you acces to individual pixels in an image. Other than could you specify what kind of re-sampling your after? |
| ||
Either use FILTEREDIMAGE with images, draw it scaled down to the backbuffer and grab it, or write your own floating-point bilinear filter using pixamps. |
| ||
Ok thx. I want the kind of scaling that doesnt simply do a linear chop. What i am after is the kind of photoshop/gimp/paintshop resize (bilenear i think) that can preserve/antialias the strong details (like scaling a lineart drawing). I will try the regrabbing a draw with filteredimage flag and see what that gets me. Failing that i guess i will have to write my own (groan) |
| ||
but don't you need the alpah channel? if you grab from the backbuffer you loose the alpha channel. |
| ||
Not for this no. |
| ||
What about one of those Windows batch image manipulation apps? |
| ||
I had to do the same a few months back for some hundreds of images. I used Brucey's FreeImage Wrapper. Here's my code (quick & dirty), in case you find something in it useful: |
| ||
hmm, thanks for that i will analyse it now :) |