The procedure scales a rectangle (.xSrc, .ySrc, .wSrc, .hSrc) from the image [.ImgSrc] to the size of destination rectangle (.xDst, .yDst, .wDst, .hDst) and draws the scaled rectangle over the image [.ImgDst].

Arguments:
.ImgSrc - the source image with format described below.
.xSrc. .ySrc - the upper left corner XY coordinates of the source rectangle.
.wSrc, .hSrc - the width and height of the source rectangle.
.ImgDst - destination image.
.xDst, .yDst - the upper left corner XY coordinates of the destination rectangle.
.wDst, .hDst - the width and height of the destination rectangle.

The pixel format is always dword ARGB, not pre multiplied alpha. The scan lines are aligned on dword.

The code must be OS independent. So, calling OS graphics functions is not allowed. 32bit code is needed. MMX is OK, but other extensions are questionable (at least I don't use them in the remaining part of the library).

I can provide some help on the integration in the library and testing, but not too time consuming.

codestar, I am not searching for reference sources or some help to implement the above task. I simply don't have time to deal with this procedure that is good to have, but not vital or even important.

So, if someone (you?) want to contribute the code for FreshLib - the interface is in my first post.

The implementation should follow, at least loosely, the coding style of FreshLib and to not use macros more than really needed. (And they must obey the assembly style: label: COP operand, operand, operand, ...)

m := resize.Resize(x, y, img, resize.NearestNeighbor) gives good enough result if you need to shrink image to something 6 times smaller, but you may need to try different algorithms if you have to shrink only a little, or to make new image larger.

I'm afraid I'm not going to recode it into assembler by hand, I'm not skilled in that at all.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum