Menu ▾ ▴

How to transform an image

wraithdu
2016-01-27
2016-01-27
  • wraithdu

    wraithdu - 2016-01-27

    Is it possible to crop an image using this library? Basically the opposite of SimdCopyFrame, I want to keep the pixels inside the bounding box. Then I need to resize that cropped image.

    Are any other transforms available or planned - rotate, mirror / flip, skew, etc?

     
  • Yermalayeu Ihar

    Yermalayeu Ihar - 2016-01-27

    Cropping of image is easy performed with using of Simd::Copy.

    See description of Simd::View structure:
    http://simd.sourceforge.net/help/struct_simd_1_1_view.html

    typedef Simd::View<simd::allocator> View;
    View original(1920, 1080, View::Bgra32);
    View cropped(100, 100, View::Bgra32);
    Simd::Copy(original.Region(100, 100, 200, 200), cropped);</simd::allocator>

    For vertical flipping see method View::Flipped().

     

Anonymous
Anonymous

Add attachments
Cancel