GrafX2 2.9.3227
The ultimate 256-color painting program
|
Saving and loading different picture formats. More...
Data Structures | |
struct | T_Color_cycle |
Data for a cycling color series. Heavily cloned from T_Gradient_array. More... | |
struct | T_IO_Context |
struct | T_Format |
Data for an image file format. More... | |
struct | T_IMG_Header |
Macros | |
#define | PREVIEW_WIDTH 120 |
#define | PREVIEW_HEIGHT 80 |
Typedefs | |
typedef void(* | Func_IO_Test) (T_IO_Context *, FILE *) |
Type of a function that can be called for a T_IO_Context. Kind of a method. More... | |
typedef void(* | Func_IO) (T_IO_Context *) |
Enumerations | |
enum | CONTEXT_TYPE { CONTEXT_MAIN_IMAGE , CONTEXT_BRUSH , CONTEXT_PREVIEW , CONTEXT_PREVIEW_PALETTE , CONTEXT_SURFACE , CONTEXT_PALETTE } |
Functions | |
void | Init_context_preview (T_IO_Context *context, const char *file_name, const char *file_directory) |
Setup for loading a preview in fileselector. More... | |
void | Init_context_layered_image (T_IO_Context *context, const char *file_name, const char *file_directory) |
Setup for loading/saving the current main image. More... | |
void | Init_context_backup_image (T_IO_Context *context, const char *file_name, const char *file_directory) |
void | Init_context_flat_image (T_IO_Context *context, const char *file_name, const char *file_directory) |
void | Init_context_brush (T_IO_Context *context, const char *file_name, const char *file_directory) |
Setup for loading/saving the flattened version of current main image. More... | |
void | Init_context_history_step (T_IO_Context *context, T_Page *page) |
void | Init_context_surface (T_IO_Context *context, const char *file_name, const char *file_directory) |
void | Destroy_context (T_IO_Context *context) |
Cleans up resources. More... | |
void | Load_image (T_IO_Context *context) |
High-level picture loading function. More... | |
void | Save_image (T_IO_Context *context) |
High-level picture saving function. More... | |
int | Check_recovery (void) |
Checks if there are any pending safety backups, and then opens them. More... | |
void | Rotate_safety_backups (void) |
Makes a safety backup periodically. More... | |
void | Delete_safety_backups (void) |
Remove safety backups. Need to call on normal program exit. More... | |
void | Image_emergency_backup (void) |
Function which attempts to save backups of the images (main and spare), called in case of SIGSEGV. More... | |
T_GFX2_Surface * | Load_surface (const char *filename, const char *directory, T_Gradient_array *gradients) |
Load an arbitrary Surface. More... | |
const T_Format * | Get_fileformat (byte format) |
unsigned int | Nb_known_formats (void) |
Total number of known file formats. More... | |
void | Pre_load (T_IO_Context *context, short width, short height, long file_size, int format, enum PIXEL_RATIO ratio, byte bpp) |
Generic allocation and similar stuff, done at beginning of image load, as soon as size is known. More... | |
void | Fill_canvas (T_IO_Context *context, byte color) |
Fill the entire current layer/frame of an image being loaded with a color. More... | |
byte | Get_pixel (T_IO_Context *context, short x, short y) |
Query the color of a pixel (to save) More... | |
void | Set_pixel (T_IO_Context *context, short x, short y, byte c) |
Set the color of a pixel (on load) More... | |
void | Set_pixel_24b (T_IO_Context *context, short x, short y, byte r, byte g, byte b) |
Set the color of a 24bit pixel (on load) More... | |
void | Set_loading_layer (T_IO_Context *context, int layer) |
Function to call when need to switch layers. More... | |
void | Set_saving_layer (T_IO_Context *context, int layer) |
Function to call when need to switch layers. More... | |
void | Set_frame_duration (T_IO_Context *context, int duration) |
Function to call when loading an image's duration. More... | |
int | Get_frame_duration (T_IO_Context *context) |
Function to call to get an image's duration for saving. More... | |
void | Set_image_mode (T_IO_Context *context, enum IMAGE_MODES mode) |
Function to set a specific image mode. More... | |
enum IMAGE_MODES | Get_image_mode (T_IO_Context *context) |
get the current image mode More... | |
Variables | |
const T_Format | File_formats [] |
Array of the known file formats. More... | |
Saving and loading different picture formats.
Also handles showing the preview in fileselectors.
#define PREVIEW_WIDTH 120 |
#define PREVIEW_HEIGHT 80 |
typedef void(* Func_IO_Test) (T_IO_Context *, FILE *) |
Type of a function that can be called for a T_IO_Context. Kind of a method.
typedef void(* Func_IO) (T_IO_Context *) |
enum CONTEXT_TYPE |
void Init_context_preview | ( | T_IO_Context * | context, |
const char * | file_name, | ||
const char * | file_directory | ||
) |
Setup for loading a preview in fileselector.
References CONTEXT_PREVIEW, T_IO_Context::File_directory, T_IO_Context::File_name, NULL, and T_IO_Context::Type.
Referenced by Button_Load_or_Save().
void Init_context_layered_image | ( | T_IO_Context * | context, |
const char * | file_name, | ||
const char * | file_directory | ||
) |
Setup for loading/saving the current main image.
References T_IO_Context::Background_transparent, T_Page::Background_transparent, T_Document::backups, T_IO_Context::Color_cycles, T_IO_Context::Comment, T_Page::Comment, CONTEXT_MAIN_IMAGE, T_IO_Context::Cycle_range, T_Color_cycle::End, T_Gradient_range::End, T_IO_Context::File_directory, T_IO_Context::File_name, T_Document::fileformat, T_IO_Context::Format, T_Page::Gradients, T_IO_Context::Height, T_Page::Image, T_Document::image_height, T_Document::image_width, T_Color_cycle::Inverse, T_Gradient_range::Inverse, Main, T_IO_Context::Nb_layers, T_Page::Nb_layers, NULL, T_List_of_pages::Pages, T_IO_Context::Palette, T_Document::palette, T_IO_Context::Pitch, Pixel_ratio, T_Image::Pixels, T_Gradient_array::Range, T_IO_Context::Ratio, T_Color_cycle::Speed, T_Gradient_range::Speed, T_Color_cycle::Start, T_Gradient_range::Start, T_IO_Context::Target_address, T_IO_Context::Transparent_color, T_Page::Transparent_color, T_IO_Context::Type, and T_IO_Context::Width.
Referenced by Button_Autosave(), Button_Quit_local_function(), Button_Reload(), Init_context_backup_image(), Init_program(), Load_picture(), Main_handler(), and Save_picture().
void Init_context_backup_image | ( | T_IO_Context * | context, |
const char * | file_name, | ||
const char * | file_directory | ||
) |
References Init_context_layered_image().
Referenced by Process_backups(), and Rotate_safety_backups().
void Init_context_flat_image | ( | T_IO_Context * | context, |
const char * | file_name, | ||
const char * | file_directory | ||
) |
void Init_context_brush | ( | T_IO_Context * | context, |
const char * | file_name, | ||
const char * | file_directory | ||
) |
Setup for loading/saving the flattened version of current main image.
Setup for loading/saving the user's brush
References Back_color, T_IO_Context::Background_transparent, Brush, Brush_fileformat, Brush_height, Brush_width, CONTEXT_BRUSH, T_IO_Context::File_directory, T_IO_Context::File_name, T_IO_Context::Format, T_IO_Context::Height, Main, T_IO_Context::Nb_layers, NULL, T_IO_Context::Palette, T_Document::palette, T_IO_Context::Pitch, PIXEL_SIMPLE, T_IO_Context::Ratio, T_IO_Context::Target_address, T_IO_Context::Transparent_color, T_IO_Context::Type, and T_IO_Context::Width.
Referenced by Load_picture(), Main_handler(), and Save_picture().
void Init_context_history_step | ( | T_IO_Context * | context, |
T_Page * | page | ||
) |
void Init_context_surface | ( | T_IO_Context * | context, |
const char * | file_name, | ||
const char * | file_directory | ||
) |
References T_IO_Context::Background_transparent, CONTEXT_SURFACE, DEFAULT_FILEFORMAT, T_IO_Context::File_directory, T_IO_Context::File_name, T_IO_Context::Format, T_IO_Context::Nb_layers, NULL, PIXEL_SIMPLE, T_IO_Context::Ratio, T_IO_Context::Transparent_color, and T_IO_Context::Type.
Referenced by Load_surface().
void Destroy_context | ( | T_IO_Context * | context | ) |
Cleans up resources.
References T_IO_Context::Buffer_image, T_IO_Context::Buffer_image_24b, T_IO_Context::File_directory, T_IO_Context::File_name, T_IO_Context::File_name_unicode, T_IO_Context::Original_file_directory, T_IO_Context::Original_file_name, and T_IO_Context::Preview_bitmap.
Referenced by Button_Autosave(), Button_Load_or_Save(), Button_Quit_local_function(), Button_Reload(), Init_program(), Load_picture(), Load_surface(), Main_handler(), Process_backups(), Rotate_safety_backups(), and Save_picture().
void Load_image | ( | T_IO_Context * | context | ) |
High-level picture loading function.
References T_Components::B, Back_color, T_IO_Context::Background_transparent, T_Page::Background_transparent, Backup_layers(), T_Document::backups, T_IO_Context::bpp, Brush_original_palette, T_IO_Context::Buffer_image, T_IO_Context::Buffer_image_24b, T_IO_Context::Color_cycles, T_IO_Context::Comment, T_Page::Comment, Compute_optimal_menu_colors(), Config, CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, CONTEXT_PREVIEW, CONTEXT_PREVIEW_PALETTE, CONTEXT_SURFACE, Convert_24b_bitmap_to_256(), Count_used_colors(), T_Document::current_layer, Cursor_shape, CURSOR_SHAPE_HOURGLASS, T_IO_Context::Cycle_range, DEFAULT_FILEFORMAT, Display_cursor(), Download_infos_page_main(), T_Color_cycle::End, T_Gradient_range::End, Error, Favorite_GUI_color(), T_IO_Context::File_directory, T_Page::File_directory, File_error, File_formats, T_IO_Context::File_name, T_IO_Context::File_name_unicode, T_Document::fileformat, T_Page::Filename, T_Page::Filename_unicode, Flush_update(), T_IO_Context::Format, format, FORMAT_ALL_FILES, FORMAT_CLIPBOARD, T_Components::G, Get_fileformat(), GFX2_ERROR, GFX2_Log(), GFX2_WARNING, T_Page::Gradients, T_IO_Context::Height, Hide_cursor, T_Page::Image, T_Document::image_height, T_Document::image_is_modified, T_Page::Image_mode, IMAGE_MODE_ANIMATION, T_Document::image_width, T_Color_cycle::Inverse, T_Gradient_range::Inverse, LAYER_NONE, T_Document::layers_visible, Load_ClipBoard_Image(), Load_Recoil_Image(), Main, MC_Black, MC_Light, MC_Window, Menu_factor_X, Nb_known_formats(), T_IO_Context::Nb_layers, NULL, Open_file_read(), T_IO_Context::Original_file_directory, T_IO_Context::Original_file_name, T_List_of_pages::Pages, T_GFX2_Surface::palette, T_IO_Context::Palette, T_Page::Palette, T_Document::palette, T_Format::Palette_only, Pixel, Pixel_ratio, PIXEL_TALL, PIXEL_TALL2, PIXEL_TALL3, PIXEL_WIDE, PIXEL_WIDE2, T_GFX2_Surface::pixels, T_Image::Pixels, T_IO_Context::Preview_bitmap, T_IO_Context::Preview_factor_X, T_IO_Context::Preview_factor_Y, PREVIEW_HEIGHT, T_IO_Context::Preview_pos_X, T_IO_Context::Preview_pos_Y, T_IO_Context::Preview_usage, PREVIEW_WIDTH, Print_in_window(), T_Components::R, T_Gradient_array::Range, T_IO_Context::Ratio, Realloc_brush(), Remap_brush(), Remap_screen_after_menu_colors_change(), T_Config::Safety_colors, Set_palette(), Set_palette_fake_24b(), T_Color_cycle::Speed, T_Gradient_range::Speed, T_Color_cycle::Start, T_Gradient_range::Start, T_IO_Context::Surface, T_IO_Context::Transparent_color, T_Page::Transparent_color, T_IO_Context::Type, Unicode_strdup(), Update_window_area, T_IO_Context::Width, and Window_rectangle().
Referenced by Button_Load_or_Save(), Button_Reload(), Init_program(), Load_picture(), Load_surface(), Main_handler(), and Process_backups().
void Save_image | ( | T_IO_Context * | context | ) |
High-level picture saving function.
References T_Document::backups, Close_window(), Confirmation_box(), CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, CONTEXT_PREVIEW, CONTEXT_PREVIEW_PALETTE, CONTEXT_SURFACE, T_Document::current_layer, Display_cursor(), Error, File_error, T_IO_Context::Format, format, FORMAT_CLIPBOARD, Get_fileformat(), T_Page::Image, T_Bitmap::Image, T_Page::Image_mode, IMAGE_MODE_ANIMATION, KEY_ESC, KEY_NONE, Main, MC_Black, MC_Light, T_IO_Context::Nb_layers, T_Page::Nb_layers, Open_window(), T_List_of_pages::Pages, T_Image::Pixels, Print_in_window(), Save_ClipBoard_Image(), T_IO_Context::Target_address, T_IO_Context::Type, Update_window_area, T_Document::visible_image, Window_clicked_button(), Window_height, Window_set_normal_button(), and Window_width.
Referenced by Button_Autosave(), Button_Load_or_Save(), Button_Quit_local_function(), Main_handler(), Rotate_safety_backups(), and Save_picture().
int Check_recovery | ( | void | ) |
Checks if there are any pending safety backups, and then opens them.
Returns 0 if there were none Returns non-zero if some backups were loaded.
References Add_backup_file(), Backups_main, Backups_spare, Button_Page(), BUTTON_PAGE, Compute_limits(), Compute_paintbrush_coordinates(), Config_directory, Create_lock_file(), For_each_file(), Main, NULL, T_Document::offset_X, T_Document::offset_Y, Process_backups(), and Safety_backup_active.
Referenced by Init_program().
void Rotate_safety_backups | ( | void | ) |
Makes a safety backup periodically.
References BACKUP_FILE_EXTENSION, T_Document::backups, Config_directory, Destroy_context(), T_Document::edits_since_safety_backup, T_Page::File_directory, T_Page::Filename, T_IO_Context::Format, FORMAT_GIF, GFX2_GetTicks(), GFX2_malloc, Init_context_backup_image(), Main, Max_edits_for_safety_backup, Max_interval_for_safety_backup, Min_edits_for_safety_backup, Min_interval_for_safety_backup, NULL, T_IO_Context::Original_file_directory, T_IO_Context::Original_file_name, T_List_of_pages::Pages, Remove_path(), Rotation_safety_backup, Safety_backup_active, T_Document::safety_backup_prefix, T_Document::safety_number, Save_image(), and T_Document::time_of_safety_backup.
Referenced by End_of_modification().
void Delete_safety_backups | ( | void | ) |
Remove safety backups. Need to call on normal program exit.
References Add_backup_file(), Backups_main, Backups_spare, Change_directory(), Config_directory, For_each_file(), T_String_list::Next, NULL, Release_lock_file(), Safety_backup_active, and T_String_list::String.
Referenced by Program_shutdown().
void Image_emergency_backup | ( | void | ) |
Function which attempts to save backups of the images (main and spare), called in case of SIGSEGV.
It will save an image only if it has just one layer... otherwise, the risk of flattening a layered image (or saving just one detail layer) is too high.
References BACKUP_FILE_EXTENSION, T_Document::backups, Emergency_backup(), T_Bitmap::Image, T_Document::image_height, T_Document::image_width, Main, Main_screen, T_Page::Nb_layers, T_List_of_pages::Pages, T_Document::palette, SAFETYBACKUP_PREFIX_A, SAFETYBACKUP_PREFIX_B, Spare, and T_Document::visible_image.
T_GFX2_Surface * Load_surface | ( | const char * | filename, |
const char * | directory, | ||
T_Gradient_array * | gradients | ||
) |
Load an arbitrary Surface.
filename | file to load. |
directory | path of the file to load. if NULL, filename have to be a full path name |
gradients | Pass the address of a target T_Gradient_array if you want the gradients, NULL otherwise |
References T_IO_Context::Color_cycles, T_IO_Context::Cycle_range, Destroy_context(), T_Color_cycle::End, T_Gradient_range::End, Init_context_surface(), T_Color_cycle::Inverse, T_Gradient_range::Inverse, Load_image(), NULL, T_Gradient_array::Range, T_Color_cycle::Speed, T_Gradient_range::Speed, T_Color_cycle::Start, T_Gradient_range::Start, and T_IO_Context::Surface.
Referenced by Define_icon(), Load_font(), Load_graphics(), and Render_text_SFont().
References File_formats, format, FORMAT_GIF, and Nb_known_formats().
Referenced by Button_Load_or_Save(), Load_image(), Load_picture(), Pre_load(), Read_list_of_files(), Save_image(), and Save_picture().
unsigned int Nb_known_formats | ( | void | ) |
Total number of known file formats.
References File_formats.
Referenced by Button_Load_or_Save(), Get_fileformat(), and Load_image().
void Pre_load | ( | T_IO_Context * | context, |
short | width, | ||
short | height, | ||
long | file_size, | ||
int | format, | ||
enum PIXEL_RATIO | ratio, | ||
byte | bpp | ||
) |
Generic allocation and similar stuff, done at beginning of image load, as soon as size is known.
References T_IO_Context::Background_transparent, Backup_new_image(), T_IO_Context::bpp, T_IO_Context::Buffer_image, T_IO_Context::Buffer_image_24b, T_IO_Context::Comment, Compute_optimal_menu_colors(), Config, CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, CONTEXT_PREVIEW, CONTEXT_PREVIEW_PALETTE, CONTEXT_SURFACE, T_Document::current_layer, File_error, T_IO_Context::Format, format, Free_GFX2_Surface(), Get_fileformat(), GFX2_malloc, T_IO_Context::Height, T_Document::layers_visible, Main, T_Config::Maximize_preview, MC_Black, MC_Light, Menu_factor_X, Menu_factor_Y, Message_out_of_memory(), T_IO_Context::Nb_layers, New_GFX2_Surface(), NULL, Num2str, T_IO_Context::Original_height, T_IO_Context::Original_width, T_IO_Context::Palette, T_Format::Palette_only, T_IO_Context::Pitch, Pixel_ratio, PIXEL_TALL, PIXEL_TALL2, PIXEL_TALL3, PIXEL_WIDE, PIXEL_WIDE2, T_GFX2_Surface::pixels, T_IO_Context::Preview_bitmap, T_IO_Context::Preview_factor_X, T_IO_Context::Preview_factor_Y, PREVIEW_HEIGHT, T_IO_Context::Preview_pos_X, T_IO_Context::Preview_pos_Y, PREVIEW_WIDTH, Print_in_window(), T_IO_Context::Ratio, Round_div_max(), Set_loading_layer(), T_IO_Context::Surface, T_IO_Context::Target_address, T_IO_Context::Transparent_color, T_IO_Context::Type, Update_window_area, T_GFX2_Surface::w, T_IO_Context::Width, Window_pos_X, Window_pos_Y, and Window_rectangle().
Referenced by Load_2GS(), Load_BMP(), Load_C64(), Load_CA1(), Load_CEL(), Load_ClipBoard_Image(), Load_CM5(), Load_FLI(), Load_GIF(), Load_GOS(), Load_GPX(), Load_GRB(), Load_HGR(), Load_ICO(), Load_IFF(), Load_IMG(), Load_INFO(), Load_MOTO(), Load_MSX(), Load_NEO(), Load_PC1(), Load_PCX(), Load_PI1(), Load_PKM(), Load_PNG_Sub(), Load_PPH(), Load_PRG(), Load_Recoil_Image(), Load_SCR(), Load_SCx(), Load_SGX(), Load_TIFF_Sub(), and Load_TNY().
void Fill_canvas | ( | T_IO_Context * | context, |
byte | color | ||
) |
Fill the entire current layer/frame of an image being loaded with a color.
References T_Document::backups, T_IO_Context::Buffer_image, CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, CONTEXT_PREVIEW, CONTEXT_PREVIEW_PALETTE, CONTEXT_SURFACE, T_IO_Context::Current_layer, T_Document::current_layer, T_IO_Context::Height, T_Page::Height, T_Page::Image, Main, Menu_factor_X, Menu_factor_Y, T_List_of_pages::Pages, T_IO_Context::Pitch, T_Image::Pixels, T_IO_Context::Preview_bitmap, PREVIEW_HEIGHT, PREVIEW_WIDTH, T_IO_Context::Type, and T_Page::Width.
Referenced by Load_GIF().
byte Get_pixel | ( | T_IO_Context * | context, |
short | x, | ||
short | y | ||
) |
Query the color of a pixel (to save)
References T_IO_Context::Height, T_IO_Context::Pitch, T_IO_Context::Target_address, and T_IO_Context::Width.
Referenced by C64_FLI(), Current_layer_count_used_colors(), Encode_C64_hires(), Encode_C64_multicolor(), GIF_next_pixel(), mode0interlace(), mode1interlace(), mode2interlace(), mode3interlace(), Save_2GS(), Save_BMP(), Save_CA1(), Save_CEL(), Save_ClipBoard_Image(), Save_CM5(), Save_GIF(), Save_HGR(), Save_ICO(), Save_IFF(), Save_IMG(), Save_MOTO(), Save_MSX(), Save_NEO(), Save_PC1(), Save_PCX(), Save_PI1(), Save_PKM(), Save_SCx(), Save_SGX_Sub(), and Save_XPM().
void Set_pixel | ( | T_IO_Context * | context, |
short | x, | ||
short | y, | ||
byte | c | ||
) |
Set the color of a pixel (on load)
References T_IO_Context::Buffer_image, CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, CONTEXT_PREVIEW, CONTEXT_PREVIEW_PALETTE, CONTEXT_SURFACE, T_IO_Context::Current_layer, File_error, GFX2_ERROR, GFX2_Log(), GFX2_WARNING, T_GFX2_Surface::h, T_IO_Context::Height, Menu_factor_X, NULL, T_IO_Context::Pitch, Pixel_in_current_screen, Pixel_ratio, PIXEL_TALL, PIXEL_TALL2, PIXEL_TALL3, PIXEL_WIDE, PIXEL_WIDE2, T_IO_Context::Preview_bitmap, T_IO_Context::Preview_factor_X, T_IO_Context::Preview_factor_Y, T_IO_Context::Preview_usage, PREVIEW_WIDTH, T_IO_Context::Ratio, Set_GFX2_Surface_pixel(), T_IO_Context::Surface, T_IO_Context::Transparent_color, T_IO_Context::Type, T_GFX2_Surface::w, and T_IO_Context::Width.
Referenced by Draw_IFF_line(), Draw_PCX_line(), GIF_new_pixel(), Load_BMP_Pixels(), Load_C64_fli(), Load_C64_hires(), Load_C64_multi(), Load_CA1(), Load_CEL(), Load_ClipBoard_Image(), Load_CM5(), Load_FLI(), Load_GOS(), Load_GRB(), Load_HGR(), Load_IMG(), Load_INFO(), Load_MOTO(), Load_MSX(), Load_NEO(), Load_PC1(), Load_PCX(), Load_PI1(), Load_PKM(), Load_PNG_Sub(), Load_PPH(), Load_Recoil_Image(), Load_SCR(), Load_SCx(), Load_TIFF_image(), Load_TNY(), PBM_Decode(), and SGX_Load_Picture().
void Set_pixel_24b | ( | T_IO_Context * | context, |
short | x_pos, | ||
short | y_pos, | ||
byte | r, | ||
byte | g, | ||
byte | b | ||
) |
Set the color of a 24bit pixel (on load)
Set the color of a 24bit pixel (on load)
References T_Components::B, T_IO_Context::Buffer_image_24b, CONTEXT_BRUSH, CONTEXT_MAIN_IMAGE, CONTEXT_PALETTE, CONTEXT_PREVIEW, CONTEXT_PREVIEW_PALETTE, CONTEXT_SURFACE, T_Components::G, T_IO_Context::Height, Menu_factor_X, T_IO_Context::Preview_bitmap, T_IO_Context::Preview_factor_X, T_IO_Context::Preview_factor_Y, T_IO_Context::Preview_usage, PREVIEW_WIDTH, T_Components::R, T_IO_Context::Type, and T_IO_Context::Width.
Referenced by Draw_IFF_line(), Draw_IFF_line_HAM(), Draw_IFF_line_PCHG(), Load_BMP_Pixels(), Load_ClipBoard_Image(), Load_PCX(), Load_PNG_Sub(), Load_Recoil_Image(), and Load_TIFF_image().
void Set_loading_layer | ( | T_IO_Context * | context, |
int | layer | ||
) |
Function to call when need to switch layers.
References Add_layer(), T_Document::backups, CONTEXT_MAIN_IMAGE, T_IO_Context::Current_layer, T_Document::current_layer, T_Page::Image, T_Document::layers_visible, Main, T_IO_Context::Nb_layers, T_Page::Nb_layers, T_List_of_pages::Pages, T_Image::Pixels, T_IO_Context::Target_address, T_IO_Context::Type, and Update_pixel_renderer().
Referenced by Load_C64_fli(), Load_CM5(), Load_FLI(), Load_GIF(), Load_HGR(), Load_IFF(), Load_INFO(), Load_MSX(), Load_TIFF_Sub(), and Pre_load().
void Set_saving_layer | ( | T_IO_Context * | context, |
int | layer | ||
) |
Function to call when need to switch layers.
References T_Document::backups, CONTEXT_MAIN_IMAGE, T_IO_Context::Current_layer, T_Page::Image, Main, T_IO_Context::Nb_layers, T_Page::Nb_layers, T_List_of_pages::Pages, T_Image::Pixels, T_IO_Context::Target_address, and T_IO_Context::Type.
Referenced by C64_FLI(), Save_C64(), Save_CM5(), Save_GIF(), Save_HGR(), Save_PRG(), and Save_TIFF_Sub().
void Set_frame_duration | ( | T_IO_Context * | context, |
int | duration | ||
) |
Function to call when loading an image's duration.
References T_Document::backups, CONTEXT_MAIN_IMAGE, T_IO_Context::Current_layer, T_Image::Duration, T_Page::Image, Main, T_List_of_pages::Pages, and T_IO_Context::Type.
Referenced by Load_FLI(), Load_GIF(), and Load_IFF().
int Get_frame_duration | ( | T_IO_Context * | context | ) |
Function to call to get an image's duration for saving.
References T_Document::backups, CONTEXT_MAIN_IMAGE, T_IO_Context::Current_layer, T_Image::Duration, T_Page::Image, Main, T_List_of_pages::Pages, and T_IO_Context::Type.
Referenced by Save_GIF().
void Set_image_mode | ( | T_IO_Context * | context, |
enum IMAGE_MODES | mode | ||
) |
Function to set a specific image mode.
References Any_effect_active(), T_Document::backups, BUTTON_EFFECTS, CONTEXT_MAIN_IMAGE, Draw_menu_button(), T_Page::Image_mode, IMAGE_MODE_ANIMATION, Main, mode, T_List_of_pages::Pages, Selected_Constraint_Mode, T_IO_Context::Type, and Update_screen_targets().
Referenced by Load_C64(), Load_CM5(), Load_FLI(), Load_GIF(), Load_GPX(), Load_HGR(), Load_IFF(), Load_INFO(), Load_MOTO(), Load_PRG(), and Load_TIFF_Sub().
enum IMAGE_MODES Get_image_mode | ( | T_IO_Context * | context | ) |
get the current image mode
References T_Document::backups, CONTEXT_MAIN_IMAGE, T_Page::Image_mode, IMAGE_MODE_LAYERED, Main, T_List_of_pages::Pages, and T_IO_Context::Type.
Referenced by Load_FLI().
|
extern |
Array of the known file formats.
Referenced by Button_Load_or_Save(), Get_fileformat(), Load_image(), and Nb_known_formats().