Author Topic: ReSampler - high quality image scaling  (Read 939 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10723
  • here on my island the sea says 'hello'
    • View Profile
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 [Select]
FUNCTION HQStretchSprite: id%, x%, y%, w%, h%
        ReSampler(id, s2, w,h)
        DRAWSPRITE s2, x,y
        GRABSPRITE s2, 0,0,0,0
Warning - the above does not work (yet), if you're currently on an offscreen (USESCREEN x).

Offline Snoopy

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile
Re: ReSampler - high quality image scaling
« Reply #1 on: 2019-Aug-07 »
It's cool and very useful, thanks Gernot :good: