Watermark function shoud receive and return Image objects #21

Open
opened 7 months ago by gytisrepecka · 1 comments
Owner

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

cbae5c1c98/cmd/webimg/main.go (L80)

// 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 7 months ago
Poster
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 Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.