Lines Matching refs:png_handler
189 PngHandler png_handler(name); in res_create_display_surface() local
190 if (!png_handler) return png_handler.error_code(); in res_create_display_surface()
192 png_structp png_ptr = png_handler.png_ptr(); in res_create_display_surface()
193 png_uint_32 width = png_handler.width(); in res_create_display_surface()
194 png_uint_32 height = png_handler.height(); in res_create_display_surface()
210 png_handler.channels(), width); in res_create_display_surface()
223 PngHandler png_handler(name); in res_create_multi_display_surface() local
224 if (!png_handler) return png_handler.error_code(); in res_create_multi_display_surface()
226 png_structp png_ptr = png_handler.png_ptr(); in res_create_multi_display_surface()
227 png_uint_32 width = png_handler.width(); in res_create_multi_display_surface()
228 png_uint_32 height = png_handler.height(); in res_create_multi_display_surface()
234 if (png_get_text(png_ptr, png_handler.info_ptr(), &text, &num_text)) { in res_create_multi_display_surface()
283 TransformRgbToDraw(p_row.data(), out_row, png_handler.channels(), width); in res_create_multi_display_surface()
303 PngHandler png_handler(name); in res_create_alpha_surface() local
304 if (!png_handler) return png_handler.error_code(); in res_create_alpha_surface()
306 if (png_handler.channels() != 1) { in res_create_alpha_surface()
310 png_structp png_ptr = png_handler.png_ptr(); in res_create_alpha_surface()
311 png_uint_32 width = png_handler.width(); in res_create_alpha_surface()
312 png_uint_32 height = png_handler.height(); in res_create_alpha_surface()
367 PngHandler png_handler(png_name); in get_locales_in_png() local
368 if (!png_handler) { in get_locales_in_png()
369 printf("Failed to open %s, error: %d\n", png_name.c_str(), png_handler.error_code()); in get_locales_in_png()
372 if (png_handler.channels() != 1) { in get_locales_in_png()
373 printf("Expect input png to have 1 data channel, this file has %d\n", png_handler.channels()); in get_locales_in_png()
378 std::vector<uint8_t> row(png_handler.width()); in get_locales_in_png()
379 for (png_uint_32 y = 0; y < png_handler.height(); ++y) { in get_locales_in_png()
380 png_read_row(png_handler.png_ptr(), row.data(), nullptr); in get_locales_in_png()
387 png_read_row(png_handler.png_ptr(), row.data(), nullptr); in get_locales_in_png()
402 PngHandler png_handler(name); in res_create_localized_alpha_surface() local
403 if (!png_handler) return png_handler.error_code(); in res_create_localized_alpha_surface()
405 if (png_handler.channels() != 1) { in res_create_localized_alpha_surface()
409 png_structp png_ptr = png_handler.png_ptr(); in res_create_localized_alpha_surface()
410 png_uint_32 width = png_handler.width(); in res_create_localized_alpha_surface()
411 png_uint_32 height = png_handler.height(); in res_create_localized_alpha_surface()