smolscale icon indicating copy to clipboard operation
smolscale copied to clipboard

Fast, embeddable C code for smooth image scaling and pixel format conversion

Results 19 smolscale issues
Sort by recently updated
recently updated
newest added

We should be able to clamp passed-in premultiplied alpha values to be at least the same magnitude as the color channels. This may not already be the case if the...

feature
api

I would like to point out that an identifier like “[`_SMOLSCALE_H_`](https://github.com/hpjansson/smolscale/blob/f333254e30b99714b934d89001dd2ccbccb95485/smolscale.h#L7 "Update candidate")” [does not fit](https://wiki.sei.cmu.edu/confluence/display/cplusplus/DCL51-CPP.+Do+not+declare+or+define+a+reserved+identifier#DCL51CPP.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29 "Do not declare an identifier which is reserved for the compiler implementation.") to the...

Currently, `do_rows()` calls `malloc()` once for each scratch row, resulting in 3-4 calls per batch. We could cut this down to one call.

optimization

Use `src_`, `dest_`, `color_` (for color to composite on) prefixes instead of `_in` and `_out` suffixes. It's more common to do it this way, and it will make more sense...

code quality
api

Add a flag that tells the pipeline that there are no transparent pixels, even in the presence of an alpha channel. This flag can be set automatically if the input...

optimization
api

Add getter API for the range of rows that are usable with `smol_scale_batch ()`. This will be more convenient, and avoids confusion with compositing operations with offsets and multiple input...

feature
api

I doubt relative offsets actually help with performance, and absolute offsets will be useful e.g. when looking up the final offset for subpixel edge blending.

code quality

The user could then calculate the row pointers on the fly, fetch them from an array, etc. This is useful for progressive loading and for image loader APIs that return...

feature
api

Add the ability to composite the scaled output on an existing image buffer or a solid color. Allow origin outside the target image (i.e. negative top-left offsets) with clipping as...

feature
api

We could allow clipping scaled output to a specific rectangle. This would be useful when zooming in on and panning around a larger image. We'll already have to deal with...

feature
api