Copy_Pixels(sx, sy, width, height, dx, dy)
Posted: 2015-06-19T15:09:21-07:00
I have a ~256 lines of pixels with complicated colors ~800 pixels long. I need to copy each line up to a dozen times to make columns > 1 pixel wide. I will create the original lines one pixel at a time as I need to do extensive calculations on each.
Is there any way to copy a rectangular area of pixels to another area? I see:
GetAuthenticPixels geometry=>geometry, width=>integer, height=>integer, x=>integer, y=>integer return image pixels as a C pointer
This looks promising. And then:
SyncAuthenticPixels sync image pixels to pixel cache
Even in the C API, the documentation is thin and examples are scarce.
Checking the web, the same PerlMagick page is mirrored myriad times, but I find no PerlMagick user-generated pages, only a few C API references.
It seems likely that a well crafted non-overlapping memcpy would do the trick. But that would require the C API. Is there any way for PerlMagick to do the same thing?
Brian
Is there any way to copy a rectangular area of pixels to another area? I see:
GetAuthenticPixels geometry=>geometry, width=>integer, height=>integer, x=>integer, y=>integer return image pixels as a C pointer
This looks promising. And then:
SyncAuthenticPixels sync image pixels to pixel cache
Even in the C API, the documentation is thin and examples are scarce.
Checking the web, the same PerlMagick page is mirrored myriad times, but I find no PerlMagick user-generated pages, only a few C API references.
It seems likely that a well crafted non-overlapping memcpy would do the trick. But that would require the C API. Is there any way for PerlMagick to do the same thing?
Brian