You didn't say that in first post I assumed it is working code just in need of optimizations.
You won't be able to do that. Pixels is a property with GetPixel(X, Y: Integer): TColor function internally. But you are able to read the pixels without converting to TLazIntFImage. You can also send the TBitmap as parameter, and then read from its canvas pixels[] or colors[] property.Code:self.FTexture:=CreateTexture(width,height,@canvas.pixels);
(Canvas.Colors[] is record structure divided in R,G,B, but works for freepascal only)
Bookmarks