Lines Matching defs:bitmap
96 // Clamp the range to the edge of the bitmap.
162 static void bitmap_to_pdf_pixels(const SkBitmap& bitmap, SkWStream* out) {
163 if (!bitmap.getPixels()) {
164 size_t size = pixel_count(bitmap) *
165 pdf_color_component_count(bitmap.colorType());
170 const SkBitmap& bm = supported_colortype(bitmap, ©);
238 static void bitmap_alpha_to_a8(const SkBitmap& bitmap, SkWStream* out) {
239 if (!bitmap.getPixels()) {
240 fill_stream(out, '\xFF', pixel_count(bitmap));
244 const SkBitmap& bm = supported_colortype(bitmap, ©);
283 SkBitmap bitmap;
284 if (!SkPDFUtils::ToBitmap(image, &bitmap)) {
286 bitmap.setInfo(SkImageInfo::MakeN32(image->width(), image->height(), image->alphaType()));
293 bitmap_alpha_to_a8(bitmap, &deflateWStream);
295 bitmap_to_pdf_pixels(bitmap, &deflateWStream);
301 pdfDict.insertInt("Width", bitmap.width());
302 pdfDict.insertInt("Height", bitmap.height());
305 } else if (1 == pdf_color_component_count(bitmap.colorType())) {
326 // This SkPDFObject only outputs the alpha layer of the given bitmap.