|
Blender V4.5
|
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 74 of file BKE_image_format.hh.
Referenced by BKE_image_path_ext_from_imformat(), BKE_image_path_ext_from_imtype(), blender::io::hydra::cache_image_file(), do_ensure_image_extension(), and image_path_ext_from_imformat_impl().
| #define IMA_CHAN_FLAG_BW 1 |
Definition at line 93 of file BKE_image_format.hh.
Referenced by BKE_image_format_set(), and BKE_imtype_valid_channels().
| #define IMA_CHAN_FLAG_RGB 2 |
Definition at line 94 of file BKE_image_format.hh.
Referenced by BKE_imtype_valid_channels().
| #define IMA_CHAN_FLAG_RGBA 4 |
Definition at line 95 of file BKE_image_format.hh.
Referenced by BKE_image_format_set(), and BKE_imtype_valid_channels().
| char BKE_ftype_to_imtype | ( | int | ftype, |
| const ImbFormatOptions * | options ) |
Definition at line 189 of file image_format.cc.
References IMB_FTYPE_BMP, IMB_FTYPE_DDS, IMB_FTYPE_IRIS, 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 83 of file image_format.cc.
References BKE_color_managed_view_settings_blend_read_data(), and ImageFormatData::view_settings.
Referenced by blender::bke::direct_link_node_socket_storage(), blender::bke::node_blend_read_data_storage(), and scene_blend_read_data().
| void BKE_image_format_blend_write | ( | BlendWriter * | writer, |
| ImageFormatData * | imf ) |
Definition at line 88 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 1043 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 1053 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, Scene::display_settings, IMB_colormanagement_role_colorspace_name_get(), ImageFormatData::linear_colorspace_settings, ColorManagedColorspaceSettings::name, STRNCPY(), ImageFormatData::view_settings, and Scene::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 48 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 57 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(), image_clipboard_copy_exec(), RE_WriteRenderViewsMovie(), and scene_free_data().
| void BKE_image_format_from_imbuf | ( | ImageFormatData * | im_format, |
| const ImBuf * | imbuf ) |
Definition at line 892 of file image_format.cc.
References BKE_image_format_init(), BLI_assert_msg, ImageFormatData::compress, ImageFormatData::depth, ELEM, ImageFormatData::exr_codec, ImbFormatOptions::flag, ImBuf::foptions, ImBuf::ftype, IMB_FTYPE_BMP, IMB_FTYPE_DDS, IMB_FTYPE_IRIS, IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_FTYPE_RADHDR, IMB_FTYPE_TGA, IMB_FTYPE_TIF, ImageFormatData::imtype, imtype_best_depth(), ImageFormatData::jp2_codec, ImageFormatData::jp2_flag, OPENEXR_CODEC_MASK, 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_B44, R_IMF_EXR_CODEC_B44A, R_IMF_EXR_CODEC_MAX, 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_imbuf(), and blender::io::usd::get_in_memory_texture_filename().
| void BKE_image_format_init | ( | ImageFormatData * | imf, |
| const bool | render ) |
Definition at line 31 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 1065 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(), image_clipboard_copy_exec(), and RE_WriteRenderViewsMovie().
| bool BKE_image_format_is_byte | ( | const ImageFormatData * | imf | ) |
Definition at line 1036 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_set | ( | ImageFormatData * | imf, |
| ID * | owner_id, | ||
| const char | imtype ) |
Definition at line 93 of file image_format.cc.
References BKE_image_format_update_color_space_for_type(), BKE_imtype_first_valid_depth(), BKE_imtype_valid_channels(), BKE_imtype_valid_depths(), ImageFormatData::depth, GS, ID_SCE, IMA_CHAN_FLAG_BW, IMA_CHAN_FLAG_RGBA, ImageFormatData::imtype, MOV_validate_output_settings(), ID::name, ImageFormatData::planes, Scene::r, R_IMF_PLANES_BW, R_IMF_PLANES_RGB, and R_IMF_PLANES_RGBA.
Referenced by arg_handle_image_type_set(), and image_clipboard_copy_exec().
| void BKE_image_format_to_imbuf | ( | ImBuf * | ibuf, |
| const ImageFormatData * | imf ) |
Definition at line 693 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_IRIS, 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_CODEC_MASK, 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 62 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_format_set(), BKE_image_save_options_update(), blo_do_versions_430(), 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.
Definition at line 558 of file image_format.cc.
References BKE_IMAGE_PATH_EXT_MAX, 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 589 of file image_format.cc.
References do_ensure_image_extension(), and ImageFormatData::imtype.
Referenced by BKE_image_render_write(), BKE_image_save_options_init(), 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 564 of file image_format.cc.
References BKE_IMAGE_PATH_EXT_MAX, and 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 596 of file image_format.cc.
References do_ensure_image_extension().
Referenced by dynamicPaint_outputSurfaceImage(), blender::io::usd::export_packed_texture(), and unpack_generate_paths().
| blender::Vector< blender::bke::path_templates::Error > BKE_image_path_from_imformat | ( | char * | filepath, |
| const char * | base, | ||
| const char * | relbase, | ||
| const blender::bke::path_templates::VariableMap * | template_variables, | ||
| int | frame, | ||
| const ImageFormatData * | im_format, | ||
| bool | use_ext, | ||
| bool | use_frames, | ||
| const char * | suffix ) |
| template_variables | the map of variables to use for template substitution. Optional: if null, template substitution will not be performed. |
Definition at line 645 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().
| blender::Vector< blender::bke::path_templates::Error > BKE_image_path_from_imtype | ( | char * | filepath, |
| const char * | base, | ||
| const char * | relbase, | ||
| const blender::bke::path_templates::VariableMap * | template_variables, | ||
| int | frame, | ||
| char | imtype, | ||
| bool | use_ext, | ||
| bool | use_frames, | ||
| const char * | suffix ) |
Definition at line 668 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_first_valid_depth | ( | const char | valid_depths | ) |
Definition at line 374 of file image_format.cc.
References i, R_IMF_CHAN_DEPTH_1, R_IMF_CHAN_DEPTH_10, R_IMF_CHAN_DEPTH_12, R_IMF_CHAN_DEPTH_16, R_IMF_CHAN_DEPTH_24, R_IMF_CHAN_DEPTH_32, and R_IMF_CHAN_DEPTH_8.
Referenced by BKE_image_format_set().
| 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 395 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 244 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 280 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 259 of file image_format.cc.
References R_IMF_IMTYPE_PNG.
Referenced by uiTemplateImageSettings().
| bool BKE_imtype_supports_quality | ( | char | imtype | ) |
Definition at line 268 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 129 of file image_format.cc.
References ELEM, ImbFormatOptions::flag, IMB_FTYPE_BMP, IMB_FTYPE_DDS, IMB_FTYPE_IRIS, 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 | ) |
Definition at line 293 of file image_format.cc.
References 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.
Referenced by BKE_image_format_set().
| char BKE_imtype_valid_depths | ( | char | imtype | ) |
Definition at line 332 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(), BKE_image_format_set(), BKE_imtype_valid_depths_with_video(), imtype_best_depth(), RE_render_result_rect_to_ibuf(), and uiTemplateImageSettings().
| char BKE_imtype_valid_depths_with_video | ( | char | imtype, |
| const ID * | owner_id ) |
Definition at line 358 of file image_format.cc.
References BKE_imtype_valid_depths(), RenderData::ffcodecdata, GS, ID_SCE, MOV_codec_valid_bit_depths(), ID::name, Scene::r, R_IMF_IMTYPE_FFMPEG, and UNUSED_VARS.