Codesnippets > 2D-snippets
ReSampler - high quality image scaling
Kitty Hello:
The following is a C++ wrapper for a library, that does high-quality image scaling.
To use it, just add the gbas file to your project. The C++ lib is linked by REQUIRE.
Here's how to use it as a STRETCHSPRITE substitute:
--- Code: (glbasic) ---FUNCTION HQStretchSprite: id%, x%, y%, w%, h%
LOCAL s2% = GENSPRITE()
ReSampler(id, s2, w,h)
DRAWSPRITE s2, x,y
GRABSPRITE s2, 0,0,0,0
ENDFUNCTION
--- End code ---
Warning - the above does not work (yet), if you're currently on an offscreen (USESCREEN x).
SnooPI:
It's cool and very useful, thanks Gernot :good:
Qedo:
I noticed that ReSampler source is no longer downloadable.
I would like to make available the optimized version that I modified and that avoids the transition from BGRA to RGBA and vice versa (for compatibility with the GLB standard) which makes it slow, but I don't know if I can share it.
Gernot are there problems to do it?
Ciao
bigsofty:
I just tried to download the original as a test Qedo, seems to be working for me?
Qedo:
sorry bigsofty I did not understand but yours is a question or a statement?
Can you download the original source?
because if you can, I have a problem
Navigation
[0] Message Index
[#] Next page
Go to full version