weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
1.97k stars 193 forks source link

Preresize or Padding feature #312

Open andreapernici opened 2 years ago

andreapernici commented 2 years ago

Hi all.

Is there a way to pre-resize the image or to insert a padding?

For example if I have an image 512x512 and I want to keep it 512x512, but with the content of the image 340x340. It can be useful to create the maskable image for manifest.

Is there a way to achieve that?

GitBoudewijn commented 2 years ago

Wouldn't this be the same as having a border (#134) with colour transparent?

andreapernici commented 2 years ago

I think the result could be the same yes.

The point is to being able to reduce the image inside a bigger container.

andrieslouw commented 2 years ago

This is needed for app manifests? Or what would the use case be?

andreapernici commented 2 years ago

App manifest is one use case, but it can be useful also for other purposes.