Crop image, cv or/and skia

Hi,
I try to crop an image/take a part of an image, but I can´t figure out how to do. can anybody give me a tip?
thanks a lot!
Best regard, matthias

With open Cv I think the values are in whole pixels rather than a ratio (-1,1), but what does the error say?

Thanks Hadasi,
yes, that was the point. It is somestimes realy confusing, how to operate with the different kind of nodes. Do you know if there is a similiar cropping-possibility in skia? That woul be nice, because I suppose for some cases the skia pipeline is more suitable. What do you think?

Matthias

You’re welcome Matthiasy,
It may not be perfect but take a look at the ‘panels’ example for Skia in the help browser

Hi matthiasz,

in Skia if you just want to draw a part of an Image or any Layer (!), you can use ClipRect and ClipPath. Please type clip in the Helpbrowser to get some examples on that.

ClipRect works like that:
image

We will also add a new Crop node with the next release, which will return a new cropped SKImage.

Best,
Anton

2 Likes

We’ve added Crop and Crop (Relative) for SKImage.
Please test it in the current previews.

Thanks a lot for your help! This is great! Thanks a lot!!
Best regards
Matthias

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.