image-js / image-js-typescript

Temporary repository to work on the migration of image-js to TypeScript
https://image-js.github.io/image-js-typescript/
MIT License
5 stars 5 forks source link

feat: add multiply/divide functions #459

Closed EscapedGibbon closed 3 months ago

EscapedGibbon commented 3 months ago

I haven't added functions as image methods. Also right now functions do not multiply alpha channels, maybe it is not needed at all, or maybe we can add an option if alpha channel should be taken into account as well.

stropitek commented 3 months ago

Also right now functions do not multiply alpha channels

Is it not possible by providing the alpha channel in the channels option?

stropitek commented 3 months ago

We need at least one test per option (channels and out)

stropitek commented 3 months ago

You can also add divide and multiply as Image methods

targos commented 3 months ago

@stropitek Was it discussed to put these methods in the compute folder? That doesn't seem right to me as it doesn't contain similar methods. I think add and subtract are similar.

stropitek commented 3 months ago

Was it discussed to put these methods in the compute folder? That doesn't seem right to me as it doesn't contain similar methods.

No this wasn't discussed and I did not pay attention to that during the review.

I think add and subtract are similar.

I agree