Watermark function shoud receive and return Image objects #21

Open
opened 2021-12-14 09:39:16 +02:00 by gytisrepecka · 1 comment
Owner

Bare-bones function should accept Image obbject and then the wrapper should accept file paths like implemented now:

doWatermark := webimg.Watermark(imageToWatermark, "watermark_inretio-logo.png", "result_img.jpg", 30, 30, 70)

// Input image, watermark image, result image, bottom-right offset X, bottom-right offset Y, watermark alpha
doWatermark := webimg.Watermark(imageToWatermark, "watermark_inretio-logo.png", "result_img.jpg", 30, 30, 70)

Both input image and watermark image should be provided as objects. Returned result should also be Image.

Bare-bones function should accept Image obbject and then the wrapper should accept file paths like implemented now: https://source.gyt.is/gytisrepecka/webimg/src/commit/cbae5c1c980e4e863ce3e23d041c8c37a8645a03/cmd/webimg/main.go#L80 ```go // Input image, watermark image, result image, bottom-right offset X, bottom-right offset Y, watermark alpha doWatermark := webimg.Watermark(imageToWatermark, "watermark_inretio-logo.png", "result_img.jpg", 30, 30, 70) ``` Both input image and watermark image should be provided as objects. Returned result should also be Image.
gytisrepecka added the
enhancement
label 2021-12-14 09:39:16 +02:00
Author
Owner

Could then perhaps be used in Hugo image watermarking.

Could then perhaps be used in [Hugo image watermarking](https://github.com/gohugoio/hugo/issues/9257).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: gytisrepecka/webimg#21
No description provided.