|
Blender V4.3
|
Go to the source code of this file.
Macros | |
| #define | BKE_IMAGE_PATH_EXT_MAX 3 |
| #define | IMA_CHAN_FLAG_BW 1 |
| #define | IMA_CHAN_FLAG_RGB 2 |
| #define | IMA_CHAN_FLAG_RGBA 4 |
| #define BKE_IMAGE_PATH_EXT_MAX 3 |
The number of extensions an image may have (.jpg, .jpeg for example). Add 1 as the array is nil terminated.
Definition at line 55 of file BKE_image_format.hh.
Referenced by do_ensure_image_extension(), and image_path_ext_from_imformat_impl().
| #define IMA_CHAN_FLAG_BW 1 |
Definition at line 74 of file BKE_image_format.hh.
Referenced by BKE_imtype_valid_channels().
| #define IMA_CHAN_FLAG_RGB 2 |
Definition at line 75 of file BKE_image_format.hh.
Referenced by BKE_imtype_valid_channels().
| #define IMA_CHAN_FLAG_RGBA 4 |
Definition at line 76 of file BKE_image_format.hh.
Referenced by BKE_imtype_valid_channels().
| char BKE_ftype_to_imtype | ( | int | ftype, |
| const ImbFormatOptions * | options ) |
Definition at line 149 of file image_format.cc.
References IMB_FTYPE_BMP, IMB_FTYPE_DDS, IMB_FTYPE_IMAGIC, IMB_FTYPE_NONE, IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_FTYPE_RADHDR, IMB_FTYPE_TGA, IMB_FTYPE_TIF, options, R_IMF_IMTYPE_BMP, R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DDS, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_IRIS, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_JPEG90, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_RAWTGA, R_IMF_IMTYPE_TARGA, R_IMF_IMTYPE_TIFF, R_IMF_IMTYPE_WEBP, and RAWTGA.
Referenced by blender::io::usd::export_packed_texture(), and unpack_generate_paths().
| void BKE_image_format_blend_read_data | ( | BlendDataReader * | reader, |
| ImageFormatData * | imf ) |
Definition at line 78 of file image_format.cc.
References BKE_color_managed_view_settings_blend_read_data(), and ImageFormatData::view_settings.
Referenced by blender::bke::node_tree_blend_read_data(), and scene_blend_read_data().
| void BKE_image_format_blend_write | ( | BlendWriter * | writer, |
| ImageFormatData * | imf ) |
Definition at line 83 of file image_format.cc.
References BKE_color_managed_view_settings_blend_write(), and ImageFormatData::view_settings.
Referenced by blender::bke::node_tree_blend_write(), and scene_blend_write().
| void BKE_image_format_color_management_copy | ( | ImageFormatData * | imf, |
| const ImageFormatData * | imf_src ) |
Definition at line 881 of file image_format.cc.
References BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), BKE_color_managed_view_settings_free(), ImageFormatData::display_settings, ImageFormatData::linear_colorspace_settings, and ImageFormatData::view_settings.
| void BKE_image_format_color_management_copy_from_scene | ( | ImageFormatData * | imf, |
| const Scene * | scene ) |
Definition at line 891 of file image_format.cc.
References BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), BKE_color_managed_view_settings_free(), COLOR_ROLE_SCENE_LINEAR, ImageFormatData::display_settings, IMB_colormanagement_role_colorspace_name_get(), ImageFormatData::linear_colorspace_settings, ColorManagedColorspaceSettings::name, STRNCPY, and ImageFormatData::view_settings.
Referenced by BKE_image_save_options_init(), and BKE_image_save_options_update().
| void BKE_image_format_copy | ( | ImageFormatData * | imf_dst, |
| const ImageFormatData * | imf_src ) |
Definition at line 43 of file image_format.cc.
References BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), ImageFormatData::display_settings, ImageFormatData::linear_colorspace_settings, and ImageFormatData::view_settings.
Referenced by BKE_scene_duplicate(), blender::io::hydra::cache_image_file(), blender::nodes::node_composite_file_output_cc::copy_output_file(), blender::nodes::node_composite_file_output_cc::init_output_file(), ntreeCompositOutputFileAddSocket(), and scene_copy_data().
| void BKE_image_format_free | ( | ImageFormatData * | imf | ) |
Definition at line 52 of file image_format.cc.
References BKE_color_managed_view_settings_free(), and ImageFormatData::view_settings.
Referenced by BKE_image_render_write(), BKE_image_save_options_free(), blender::io::hydra::cache_image_file(), blender::nodes::node_composite_file_output_cc::free_output_file(), RE_WriteRenderViewsMovie(), and scene_free_data().
| void BKE_image_format_from_imbuf | ( | ImageFormatData * | im_format, |
| const ImBuf * | imbuf ) |
Definition at line 746 of file image_format.cc.
References BKE_image_format_init(), BLI_assert_msg, ImageFormatData::compress, ImageFormatData::depth, ImageFormatData::exr_codec, ImbFormatOptions::flag, ImBuf::foptions, ImBuf::ftype, IMB_FTYPE_BMP, IMB_FTYPE_DDS, IMB_FTYPE_IMAGIC, IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_FTYPE_RADHDR, IMB_FTYPE_TGA, IMB_FTYPE_TIF, ImageFormatData::imtype, ImageFormatData::jp2_codec, ImageFormatData::jp2_flag, OPENEXR_COMPRESS, OPENEXR_HALF, ImageFormatData::planes, ImBuf::planes, PNG_16BIT, ImageFormatData::quality, ImbFormatOptions::quality, R_IMF_CHAN_DEPTH_12, R_IMF_CHAN_DEPTH_16, R_IMF_EXR_CODEC_ZIP, R_IMF_IMTYPE_BMP, R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DDS, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_IRIS, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_JPEG90, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_RAWTGA, R_IMF_IMTYPE_TARGA, R_IMF_IMTYPE_TIFF, R_IMF_IMTYPE_WEBP, R_IMF_JP2_CODEC_J2K, R_IMF_JP2_CODEC_JP2, R_IMF_JP2_FLAG_CINE_48, R_IMF_JP2_FLAG_CINE_PRESET, R_IMF_JP2_FLAG_YCC, R_IMF_TIFF_CODEC_DEFLATE, R_IMF_TIFF_CODEC_LZW, R_IMF_TIFF_CODEC_NONE, R_IMF_TIFF_CODEC_PACKBITS, RAWTGA, TIF_16BIT, TIF_COMPRESS_DEFLATE, TIF_COMPRESS_LZW, TIF_COMPRESS_NONE, TIF_COMPRESS_PACKBITS, and ImageFormatData::tiff_codec.
Referenced by BKE_image_buffer_format_writable(), BKE_image_save_options_init(), blender::io::usd::export_in_memory_texture(), and blender::io::usd::get_in_memory_texture_filename().
| void BKE_image_format_init | ( | ImageFormatData * | imf, |
| const bool | render ) |
Definition at line 26 of file image_format.cc.
References BKE_color_managed_colorspace_settings_init(), BKE_color_managed_display_settings_init(), BKE_color_managed_view_settings_init_default(), BKE_color_managed_view_settings_init_render(), ImageFormatData::display_settings, DNA_struct_default_get, ImageFormatData::linear_colorspace_settings, and ImageFormatData::view_settings.
Referenced by BKE_image_format_from_imbuf(), BKE_image_save_options_init(), blender::nodes::node_composite_file_output_cc::init_output_file(), ntreeCompositOutputFileAddSocket(), scene_init_data(), and screenshot_data_create().
| void BKE_image_format_init_for_write | ( | ImageFormatData * | imf, |
| const Scene * | scene_src, | ||
| const ImageFormatData * | imf_src ) |
Definition at line 903 of file image_format.cc.
References BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), ImageFormatData::color_management, COLOR_ROLE_SCENE_LINEAR, ImageFormatData::display_settings, Scene::display_settings, RenderData::im_format, IMB_colormanagement_role_colorspace_name_get(), ImageFormatData::linear_colorspace_settings, ColorManagedColorspaceSettings::name, Scene::r, R_IMF_COLOR_MANAGEMENT_OVERRIDE, STRNCPY, ImageFormatData::view_settings, and Scene::view_settings.
Referenced by BKE_image_render_write(), BKE_image_save_options_init(), BKE_image_save_options_update(), and RE_WriteRenderViewsMovie().
| bool BKE_image_format_is_byte | ( | const ImageFormatData * | imf | ) |
Definition at line 874 of file image_format.cc.
References BKE_imtype_valid_depths(), ImageFormatData::depth, ImageFormatData::imtype, and R_IMF_CHAN_DEPTH_8.
Referenced by IMB_colormanagement_imbuf_for_write().
| void BKE_image_format_to_imbuf | ( | ImBuf * | ibuf, |
| const ImageFormatData * | imf ) |
Definition at line 586 of file image_format.cc.
References BLI_assert_msg, ImageFormatData::cineon_flag, ImageFormatData::compress, ImageFormatData::depth, ELEM, ImageFormatData::exr_codec, ImbFormatOptions::flag, ImBuf::foptions, ImBuf::ftype, IMB_FTYPE_BMP, IMB_FTYPE_DDS, IMB_FTYPE_IMAGIC, IMB_FTYPE_JPG, IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_FTYPE_RADHDR, IMB_FTYPE_TGA, IMB_FTYPE_TIF, ImageFormatData::imtype, ImageFormatData::jp2_codec, ImageFormatData::jp2_flag, OPENEXR_COMPRESS, OPENEXR_HALF, PNG_16BIT, ImageFormatData::quality, ImbFormatOptions::quality, R_IMF_CHAN_DEPTH_10, R_IMF_CHAN_DEPTH_12, R_IMF_CHAN_DEPTH_16, R_IMF_CINEON_FLAG_LOG, R_IMF_IMTYPE_AV1, R_IMF_IMTYPE_BMP, R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DDS, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_IRIS, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_RAWTGA, R_IMF_IMTYPE_TARGA, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_TIFF, R_IMF_IMTYPE_WEBP, R_IMF_IMTYPE_XVID, R_IMF_JP2_CODEC_J2K, R_IMF_JP2_CODEC_JP2, R_IMF_JP2_FLAG_CINE_48, R_IMF_JP2_FLAG_CINE_PRESET, R_IMF_JP2_FLAG_YCC, R_IMF_TIFF_CODEC_DEFLATE, R_IMF_TIFF_CODEC_LZW, R_IMF_TIFF_CODEC_NONE, R_IMF_TIFF_CODEC_PACKBITS, RAWTGA, TIF_16BIT, TIF_COMPRESS_DEFLATE, TIF_COMPRESS_LZW, TIF_COMPRESS_NONE, TIF_COMPRESS_PACKBITS, and ImageFormatData::tiff_codec.
Referenced by BKE_imbuf_write(), and image_save_single().
| void BKE_image_format_update_color_space_for_type | ( | ImageFormatData * | format | ) |
Definition at line 57 of file image_format.cc.
References BKE_imtype_requires_linear_float(), COLOR_ROLE_DEFAULT_BYTE, COLOR_ROLE_DEFAULT_FLOAT, IMB_colormanagement_role_colorspace_name_get(), IMB_colormanagement_space_name_is_data(), IMB_colormanagement_space_name_is_scene_linear(), and STRNCPY.
Referenced by BKE_image_save_options_update(), blender::nodes::node_composite_file_output_cc::init_output_file(), and ntreeCompositOutputFileAddSocket().
| int BKE_image_path_ext_from_imformat | ( | const ImageFormatData * | im_format, |
| const char * | r_ext[BKE_IMAGE_PATH_EXT_MAX] ) |
Fill in an array of acceptable image extensions for the image format.
r_ext[0]). r_ext, 0 for unsupported formats. Definition at line 485 of file image_format.cc.
References image_path_ext_from_imformat_impl(), and ImageFormatData::imtype.
Referenced by blender::io::hydra::cache_image_file().
| int BKE_image_path_ext_from_imformat_ensure | ( | char * | filepath, |
| size_t | filepath_maxncpy, | ||
| const ImageFormatData * | im_format ) |
Definition at line 516 of file image_format.cc.
References do_ensure_image_extension(), and ImageFormatData::imtype.
Referenced by BKE_image_render_write(), blender::io::usd::export_in_memory_texture(), blender::io::usd::get_in_memory_texture_filename(), and WM_operator_filesel_ensure_ext_imtype().
| int BKE_image_path_ext_from_imtype | ( | const char | imtype, |
| const char * | r_ext[BKE_IMAGE_PATH_EXT_MAX] ) |
Definition at line 491 of file image_format.cc.
References image_path_ext_from_imformat_impl().
| int BKE_image_path_ext_from_imtype_ensure | ( | char * | filepath, |
| size_t | filepath_maxncpy, | ||
| char | imtype ) |
Definition at line 523 of file image_format.cc.
References do_ensure_image_extension().
Referenced by dynamicPaint_outputSurfaceImage(), blender::io::usd::export_packed_texture(), and unpack_generate_paths().
| void BKE_image_path_from_imformat | ( | char * | filepath, |
| const char * | base, | ||
| const char * | relbase, | ||
| int | frame, | ||
| const ImageFormatData * | im_format, | ||
| bool | use_ext, | ||
| bool | use_frames, | ||
| const char * | suffix ) |
Definition at line 559 of file image_format.cc.
References do_makepicstring(), and ImageFormatData::imtype.
Referenced by do_write_image_or_movie(), blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_single_layer_image_path(), RE_RenderAnim(), RE_RenderFrame(), screen_opengl_render_anim_step(), screen_opengl_render_write(), and write_result().
| void BKE_image_path_from_imtype | ( | char * | filepath, |
| const char * | base, | ||
| const char * | relbase, | ||
| int | frame, | ||
| char | imtype, | ||
| bool | use_ext, | ||
| bool | use_frames, | ||
| const char * | suffix ) |
Definition at line 572 of file image_format.cc.
References do_makepicstring().
Referenced by blender::ed::object::bake_targets_output_external(), and blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_multi_layer_exr_image_path().
| char BKE_imtype_from_arg | ( | const char * | imtype_arg | ) |
String is from command line --render-format argument, keep in sync with creator_args.cc help info.
Definition at line 322 of file image_format.cc.
References R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_AVIRAW, R_IMF_IMTYPE_BMP, R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_INVALID, R_IMF_IMTYPE_IRIS, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_JPEG90, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_RAWTGA, R_IMF_IMTYPE_TARGA, R_IMF_IMTYPE_TIFF, R_IMF_IMTYPE_WEBP, and STREQ.
Referenced by arg_handle_image_type_set().
| bool BKE_imtype_is_movie | ( | char | imtype | ) |
Definition at line 204 of file image_format.cc.
References R_IMF_IMTYPE_AV1, R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_AVIRAW, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, and R_IMF_IMTYPE_XVID.
Referenced by BKE_scene_multiview_num_videos_get(), do_write_image_or_movie(), blender::nodes::node_composite_file_output_cc::init_output_file(), ntreeCompositOutputFileAddSocket(), RE_InitState(), RE_RenderAnim(), RE_RenderFrame(), screen_opengl_render_anim_init(), screen_opengl_render_anim_step(), screen_opengl_render_end(), screen_opengl_render_init(), screen_render_exec(), screen_render_invoke(), and write_result().
| bool BKE_imtype_requires_linear_float | ( | char | imtype | ) |
Definition at line 240 of file image_format.cc.
References R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, and R_IMF_IMTYPE_RADHDR.
Referenced by BKE_image_format_update_color_space_for_type(), image_save_post(), IMB_colormanagement_imbuf_for_write(), and uiTemplateImageSettings().
| bool BKE_imtype_supports_compress | ( | char | imtype | ) |
Definition at line 219 of file image_format.cc.
References R_IMF_IMTYPE_PNG.
Referenced by uiTemplateImageSettings().
| bool BKE_imtype_supports_quality | ( | char | imtype | ) |
Definition at line 228 of file image_format.cc.
References R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_JPEG90, and R_IMF_IMTYPE_WEBP.
Referenced by uiTemplateImageSettings().
| int BKE_imtype_to_ftype | ( | char | imtype, |
| ImbFormatOptions * | r_options ) |
Definition at line 90 of file image_format.cc.
References ELEM, ImbFormatOptions::flag, IMB_FTYPE_BMP, IMB_FTYPE_DDS, IMB_FTYPE_IMAGIC, IMB_FTYPE_JPG, IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_FTYPE_RADHDR, IMB_FTYPE_TGA, IMB_FTYPE_TIF, ImbFormatOptions::quality, R_IMF_IMTYPE_BMP, R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DDS, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_IRIS, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_RAWTGA, R_IMF_IMTYPE_TARGA, R_IMF_IMTYPE_TIFF, R_IMF_IMTYPE_WEBP, and RAWTGA.
Referenced by BKE_image_buffer_format_writable().
| char BKE_imtype_valid_channels | ( | char | imtype, |
| bool | write_file ) |
Definition at line 253 of file image_format.cc.
References ATTR_FALLTHROUGH, IMA_CHAN_FLAG_BW, IMA_CHAN_FLAG_RGB, IMA_CHAN_FLAG_RGBA, R_IMF_IMTYPE_BMP, R_IMF_IMTYPE_DDS, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_IRIS, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_JPEG90, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_RAWTGA, R_IMF_IMTYPE_TARGA, R_IMF_IMTYPE_TIFF, and R_IMF_IMTYPE_WEBP.
| char BKE_imtype_valid_depths | ( | char | imtype | ) |
Definition at line 296 of file image_format.cc.
References R_IMF_CHAN_DEPTH_10, R_IMF_CHAN_DEPTH_12, R_IMF_CHAN_DEPTH_16, R_IMF_CHAN_DEPTH_32, R_IMF_CHAN_DEPTH_8, R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_RADHDR, and R_IMF_IMTYPE_TIFF.
Referenced by BKE_image_format_is_byte(), imtype_best_depth(), RE_render_result_rect_to_ibuf(), and uiTemplateImageSettings().