Skip to content

Commit a1d020b

Browse files
One more fix for deprecated getPixels()
1 parent a986439 commit a1d020b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ofxTurboJpeg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ class ofxTurboJpeg
2020
int pitch = 0, flags = 0, jpegsubsamp = 0;
2121
*size = 0;
2222

23-
unsigned int bpp = img.getPixelsRef().getNumChannels();
23+
unsigned int bpp = img.getPixels().getNumChannels();
2424

2525
unsigned char * output = (unsigned char*) malloc ( sizeof(char) * img.getWidth() * img.getHeight() * bpp );
26-
tjCompress(handleCompress, img.getPixels() , img.getWidth(), pitch, img.getHeight(), bpp, output, size, jpegsubsamp, jpegQuality, flags);
26+
tjCompress(handleCompress, img.getPixels().getData() , img.getWidth(), pitch, img.getHeight(), bpp, output, size, jpegsubsamp, jpegQuality, flags);
2727

2828
return output;
2929
}

0 commit comments

Comments
 (0)