unicef / iogt

BSD 2-Clause "Simplified" License
25 stars 35 forks source link

Extend illustration "canvas" to enable adjustable width/height images #1059

Open cbunicef opened 2 years ago

cbunicef commented 2 years ago

As a CONTENT DEVELOPER I want to be able to take existing illustrations and use them in different aspect ratios to meet different requirements on my site. For example, it may make sense for a single illustration to be used in spaces which are horizontal rectangles and also in spaces which are square.

Potential solution: Many of the illustrations that have been produced for IoGT have elements that are centered and don't touch the vertical or horizontal edges of the image:

image

image

image

image

Using an image editor, it's possible to take these sides where the last line of pixels are all the same color, and extend them to other shapes.

For example this rectangle

image

becomes this square

image

by duplicating the top and bottom rows of pixels above and below the image.

The typical dialogue for this in image editing tools is

image (example from photopea.com)

Other changes could be done to convert

image

to

image

It looks like some of the work needed has already been done by the Image URL Generator UI

cbunicef commented 2 years ago

We can balance the work required to complete this feature against the fact that using a free photo editor isn't THAT difficult.

Pros of adding this feature: