Lines Matching refs:quality
109 static void disableSubsamplingForHighQuality(jpeg_compress_struct* cinfo, int quality)
111 if (quality < 100)
120 static bool encodePixels(IntSize imageSize, unsigned char* inputPixels, bool premultiplied, int quality, Vector<unsigned char>* output)
155 jpeg_set_quality(&cinfo, quality, TRUE);
156 disableSubsamplingForHighQuality(&cinfo, quality);
181 jpeg_set_quality(&cinfo, quality, TRUE);
182 disableSubsamplingForHighQuality(&cinfo, quality);
200 bool JPEGImageEncoder::encode(const SkBitmap& bitmap, int quality, Vector<unsigned char>* output)
207 return encodePixels(IntSize(bitmap.width(), bitmap.height()), static_cast<unsigned char *>(bitmap.getPixels()), true, quality, output);
210 bool JPEGImageEncoder::encode(const ImageDataBuffer& imageData, int quality, Vector<unsigned char>* output)
212 return encodePixels(imageData.size(), imageData.data(), false, quality, output);