Hi!

I am currently using a ImageManip node to rotate the image using:

im.initialConfig.setWarpTransformFourPoints(..., True)

However, I am unable to also crop the image using the same ImageManip node:

im.initialConfig.setCropRect(0.2, 0.2, 0.8. 0.8)

It works if I pass the rotated image into a different ImageManip node using the same command to crop.

Is there a limitation to the ImageNode that I do not know about? or am I doing something wrong? Do two ImageManip nodes use more resources than just one?

Thanks!

    Hi Kristoffer
    I think it doesn't work inside the same manip since setWarpTransformFourPoints overrides the cropRect. This is because setWarpTransformFourPoints uses the same method for cropping, so setCropRect is ignored in this case. On the other hand, setResize() works as expected.

    Using two imgmanips instead of one will not use more resources. The main thing that uses resources are image manipulations, not instances of ImageManip nodes.

    Thanks,
    Jaka

    13 days later

    Thanks for clarifying! 🙂 Also, when cropping, do I need to ensure width and height are multiples of 16? I am having some unexplainable issues when adjusting the height and width of the cropped area. For certain values it does not make sense eg. the cropped area is moved to a different place or changes dimensions.

    Thanks again!

      Hi Kristoffer
      Could you explain this a bit more, maybe add some images? I know the warp4points had issues in the past, which could be fixed by using even numbers for pixel values.

      Thanks,
      Jaka

      6 days later

      I was unable to reproduce the problem at the moment, maybe it fixed itself after I included setResize as the last step.

      Anyway, thanks 🙂