mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-12-02 09:06:26 +00:00
O2ImageCreateWithImageInRect is broken
This commit is contained in:
parent
c57160a645
commit
d61944b682
@ -467,17 +467,16 @@ O2ImageRef O2ImageCreateWithImageInRect(O2ImageRef self,O2Rect rect) {
|
||||
for(row=0;row<height;row++){
|
||||
const uint8_t *rowBytes=pixelBytes+(x*self->_bitsPerPixel)/8;
|
||||
|
||||
for(col=0;col<width;col++){
|
||||
for(col=0;col<childBytesPerRow;col++){
|
||||
// Copy all of the needed bytes for the row
|
||||
childPixelBytes[childIndex++]=rowBytes[col];
|
||||
}
|
||||
}
|
||||
|
||||
pixelBytes+=self->_bytesPerRow;
|
||||
}
|
||||
|
||||
NSData *data=[NSData dataWithBytesNoCopy:childPixelBytes length:childIndex];
|
||||
O2DataProviderRef provider=O2DataProviderCreateWithCFData(data);
|
||||
|
||||
[data release];
|
||||
|
||||
O2ImageRef result=O2ImageCreate(width,height,self->_bitsPerComponent,self->_bitsPerPixel,childBytesPerRow,self->_colorSpace,self->_bitmapInfo,provider,self->_decode,self->_interpolate,self->_renderingIntent);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user