The IMGLIB libraries that I recently published, for BB4W and BBCSDL, take a scale parameter (which determines the size of the rendered image) and a flip parameter (which controls whether the image is flipped horizontally and/or vertically). I am considering changing this interface so that instead they take a horizontal scale and a vertical scale, with flipping determined by the signs. So a horizontal scale factor of -1.0 would result in a horizontal flip.
This would provide the additional flexibility of being able to change the aspect ratio, whilst not increasing the number of parameters. What do you think? Is this a good idea? Obviously it's an incompatible change but I don't imagine very many people have already used the libraries. If I don't receive any major objections I will revise and re-publish the libraries.
Proposal to change IMGLIB libraries
Re: Proposal to change IMGLIB libraries
Hi Richard,
That sounds an eminently sensible suggestion - and as you say, it's unlikely the libraries are already too deeply embedded in existing programs!

D
That sounds an eminently sensible suggestion - and as you say, it's unlikely the libraries are already too deeply embedded in existing programs!

D
Re: Proposal to change IMGLIB libraries
I've also added a new procedure to both libraries:
This can be useful for automatically creating a shadow image (attenuate the RGB to zero; halve, say, the alpha) or fading an image in or out (gradually change the alpha channel from 0.0 to 1.0, or from 1.0 to 0.0).
Code: Select all
REM Multiply the image's R, G, B, A values by the specified factors:
DEF PROC_imgMult(i%%, r, g, b, a)
- hellomike
- Posts: 184
- Joined: Sat 09 Jun 2018, 09:47
- Location: Amsterdam
Re: Proposal to change IMGLIB libraries
I just made a little program to test the library.
Feel free to make the proposed changes. Also every additional functionality is welcome.
Mike
Feel free to make the proposed changes. Also every additional functionality is welcome.
Mike