Fix colour shift in Crop function due to not multiplying x position by colours
This commit is contained in:
parent
70313ce152
commit
c0eb790e45
|
@ -1416,9 +1416,9 @@ bool Image::Crop( unsigned int lo_x, unsigned int lo_y, unsigned int hi_x, unsig
|
|||
|
||||
unsigned int new_stride = new_width * colours;
|
||||
for ( unsigned int y = lo_y, ny = 0; y <= hi_y; y++, ny++ ) {
|
||||
unsigned char *pbuf = &buffer[((y*linesize)+lo_x)];
|
||||
unsigned char *pnbuf = &new_buffer[(ny*new_width)*colours];
|
||||
memcpy( pnbuf, pbuf, new_stride );
|
||||
unsigned char *pbuf = &buffer[((y*linesize)+(lo_x*colours))];
|
||||
unsigned char *pnbuf = &new_buffer[ny*new_stride];
|
||||
memcpy(pnbuf, pbuf, new_stride);
|
||||
}
|
||||
|
||||
AssignDirect(new_width, new_height, colours, subpixelorder, new_buffer, new_size, ZM_BUFTYPE_ZM);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 14292374ccf1328f2d5db20897bd06f99ba4d938
|
||||
Subproject commit 0bd63fb464957080ead342db58ca9e01532cf1ef
|
Loading…
Reference in New Issue