
/* Automatically generated struct definitions for the Data API.
 * Do not edit manually, changes will be overwritten.           */

#define RNA_RUNTIME

#include <float.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>

#include <stddef.h>

#include "MEM_guardedalloc.h"

#include "DNA_ID.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"

#include "BLI_utildefines.h"

#include "BKE_context.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "RNA_define.h"
#include "RNA_types.h"
#include "rna_internal.h"

#include "rna_prototypes_gen.h"

#include "rna_image.c"
#include "rna_image_api.c"

/* Autogenerated Functions */


CollectionPropertyRNA rna_RenderSlot_rna_properties;
PointerPropertyRNA rna_RenderSlot_rna_type;
StringPropertyRNA rna_RenderSlot_name;


CollectionPropertyRNA rna_RenderSlots_rna_properties;
PointerPropertyRNA rna_RenderSlots_rna_type;
PointerPropertyRNA rna_RenderSlots_active;
IntPropertyRNA rna_RenderSlots_active_index;


extern CollectionPropertyRNA rna_ID_rna_properties;
extern PointerPropertyRNA rna_ID_rna_type;
extern StringPropertyRNA rna_ID_name;
extern IntPropertyRNA rna_ID_users;
extern BoolPropertyRNA rna_ID_use_fake_user;
extern BoolPropertyRNA rna_ID_tag;
extern BoolPropertyRNA rna_ID_is_updated;
extern BoolPropertyRNA rna_ID_is_updated_data;
extern BoolPropertyRNA rna_ID_is_library_indirect;
extern PointerPropertyRNA rna_ID_library;
extern PointerPropertyRNA rna_ID_preview;

StringPropertyRNA rna_Image_filepath;
StringPropertyRNA rna_Image_filepath_raw;
EnumPropertyRNA rna_Image_file_format;
EnumPropertyRNA rna_Image_source;
EnumPropertyRNA rna_Image_type;
PointerPropertyRNA rna_Image_packed_file;
CollectionPropertyRNA rna_Image_packed_files;
EnumPropertyRNA rna_Image_field_order;
BoolPropertyRNA rna_Image_use_fields;
BoolPropertyRNA rna_Image_use_view_as_render;
BoolPropertyRNA rna_Image_use_alpha;
BoolPropertyRNA rna_Image_use_deinterlace;
BoolPropertyRNA rna_Image_use_multiview;
BoolPropertyRNA rna_Image_is_stereo_3d;
BoolPropertyRNA rna_Image_is_multiview;
BoolPropertyRNA rna_Image_is_dirty;
EnumPropertyRNA rna_Image_generated_type;
IntPropertyRNA rna_Image_generated_width;
IntPropertyRNA rna_Image_generated_height;
BoolPropertyRNA rna_Image_use_generated_float;
FloatPropertyRNA rna_Image_generated_color;
EnumPropertyRNA rna_Image_mapping;
FloatPropertyRNA rna_Image_display_aspect;
BoolPropertyRNA rna_Image_use_animation;
IntPropertyRNA rna_Image_frame_start;
IntPropertyRNA rna_Image_frame_end;
IntPropertyRNA rna_Image_fps;
BoolPropertyRNA rna_Image_use_tiles;
IntPropertyRNA rna_Image_tiles_x;
IntPropertyRNA rna_Image_tiles_y;
BoolPropertyRNA rna_Image_use_clamp_x;
BoolPropertyRNA rna_Image_use_clamp_y;
IntPropertyRNA rna_Image_bindcode;
CollectionPropertyRNA rna_Image_render_slots;
BoolPropertyRNA rna_Image_has_data;
IntPropertyRNA rna_Image_depth;
IntPropertyRNA rna_Image_size;
FloatPropertyRNA rna_Image_resolution;
IntPropertyRNA rna_Image_frame_duration;
FloatPropertyRNA rna_Image_pixels;
IntPropertyRNA rna_Image_channels;
BoolPropertyRNA rna_Image_is_float;
PointerPropertyRNA rna_Image_colorspace_settings;
EnumPropertyRNA rna_Image_alpha_mode;
EnumPropertyRNA rna_Image_views_format;
PointerPropertyRNA rna_Image_stereo_3d_format;

extern FunctionRNA rna_ID_copy_func;
extern PointerPropertyRNA rna_ID_copy_id;

extern FunctionRNA rna_ID_user_clear_func;
extern FunctionRNA rna_ID_user_remap_func;
extern PointerPropertyRNA rna_ID_user_remap_new_id;

extern FunctionRNA rna_ID_make_local_func;
extern BoolPropertyRNA rna_ID_make_local_clear_proxy;
extern PointerPropertyRNA rna_ID_make_local_id;

extern FunctionRNA rna_ID_user_of_id_func;
extern PointerPropertyRNA rna_ID_user_of_id_id;
extern IntPropertyRNA rna_ID_user_of_id_count;

extern FunctionRNA rna_ID_animation_data_create_func;
extern PointerPropertyRNA rna_ID_animation_data_create_anim_data;

extern FunctionRNA rna_ID_animation_data_clear_func;
extern FunctionRNA rna_ID_update_tag_func;
extern EnumPropertyRNA rna_ID_update_tag_refresh;


extern FunctionRNA rna_Image_save_render_func;
extern StringPropertyRNA rna_Image_save_render_filepath;
extern PointerPropertyRNA rna_Image_save_render_scene;

extern FunctionRNA rna_Image_save_func;
extern FunctionRNA rna_Image_pack_func;
extern BoolPropertyRNA rna_Image_pack_as_png;
extern StringPropertyRNA rna_Image_pack_data;
extern IntPropertyRNA rna_Image_pack_data_len;

extern FunctionRNA rna_Image_unpack_func;
extern EnumPropertyRNA rna_Image_unpack_method;

extern FunctionRNA rna_Image_reload_func;
extern FunctionRNA rna_Image_update_func;
extern FunctionRNA rna_Image_scale_func;
extern IntPropertyRNA rna_Image_scale_width;
extern IntPropertyRNA rna_Image_scale_height;

extern FunctionRNA rna_Image_gl_touch_func;
extern IntPropertyRNA rna_Image_gl_touch_frame;
extern IntPropertyRNA rna_Image_gl_touch_filter;
extern IntPropertyRNA rna_Image_gl_touch_mag;
extern IntPropertyRNA rna_Image_gl_touch_error;

extern FunctionRNA rna_Image_gl_load_func;
extern IntPropertyRNA rna_Image_gl_load_frame;
extern IntPropertyRNA rna_Image_gl_load_filter;
extern IntPropertyRNA rna_Image_gl_load_mag;
extern IntPropertyRNA rna_Image_gl_load_error;

extern FunctionRNA rna_Image_gl_free_func;
extern FunctionRNA rna_Image_filepath_from_user_func;
extern PointerPropertyRNA rna_Image_filepath_from_user_image_user;
extern StringPropertyRNA rna_Image_filepath_from_user_filepath;

extern FunctionRNA rna_Image_buffers_free_func;


CollectionPropertyRNA rna_ImageUser_rna_properties;
PointerPropertyRNA rna_ImageUser_rna_type;
BoolPropertyRNA rna_ImageUser_use_auto_refresh;
IntPropertyRNA rna_ImageUser_frame_current;
BoolPropertyRNA rna_ImageUser_use_cyclic;
IntPropertyRNA rna_ImageUser_frame_duration;
IntPropertyRNA rna_ImageUser_frame_offset;
IntPropertyRNA rna_ImageUser_frame_start;
IntPropertyRNA rna_ImageUser_fields_per_frame;
IntPropertyRNA rna_ImageUser_multilayer_layer;
IntPropertyRNA rna_ImageUser_multilayer_pass;
IntPropertyRNA rna_ImageUser_multilayer_view;


CollectionPropertyRNA rna_ImagePackedFile_rna_properties;
PointerPropertyRNA rna_ImagePackedFile_rna_type;
PointerPropertyRNA rna_ImagePackedFile_packed_file;
StringPropertyRNA rna_ImagePackedFile_filepath;

extern FunctionRNA rna_ImagePackedFile_save_func;

static PointerRNA RenderSlot_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void RenderSlot_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_RenderSlot_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = RenderSlot_rna_properties_get(iter);
}

void RenderSlot_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = RenderSlot_rna_properties_get(iter);
}

void RenderSlot_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int RenderSlot_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA RenderSlot_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

void RenderSlot_name_get(PointerRNA *ptr, char *value)
{
	RenderSlot *data = (RenderSlot *)(ptr->data);
	BLI_strncpy_utf8(value, data->name, 64);
}

int RenderSlot_name_length(PointerRNA *ptr)
{
	RenderSlot *data = (RenderSlot *)(ptr->data);
	return strlen(data->name);
}

void RenderSlot_name_set(PointerRNA *ptr, const char *value)
{
	RenderSlot *data = (RenderSlot *)(ptr->data);
	BLI_strncpy_utf8(data->name, value, 64);
}

static PointerRNA RenderSlots_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void RenderSlots_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_RenderSlots_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = RenderSlots_rna_properties_get(iter);
}

void RenderSlots_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = RenderSlots_rna_properties_get(iter);
}

void RenderSlots_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int RenderSlots_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA RenderSlots_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

PointerRNA RenderSlots_active_get(PointerRNA *ptr)
{
	return rna_render_slots_active_get(ptr);
}

void RenderSlots_active_set(PointerRNA *ptr, PointerRNA value)
{
	rna_render_slots_active_set(ptr, value);
}

int RenderSlots_active_index_get(PointerRNA *ptr)
{
	return rna_render_slots_active_index_get(ptr);
}

void RenderSlots_active_index_set(PointerRNA *ptr, int value)
{
	rna_render_slots_active_index_set(ptr, value);
}

void Image_filepath_get(PointerRNA *ptr, char *value)
{
	Image *data = (Image *)(ptr->data);
	BLI_strncpy(value, data->name, 1024);
}

int Image_filepath_length(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return strlen(data->name);
}

void Image_filepath_set(PointerRNA *ptr, const char *value)
{
	Image *data = (Image *)(ptr->data);
	BLI_strncpy(data->name, value, 1024);
}

void Image_filepath_raw_get(PointerRNA *ptr, char *value)
{
	Image *data = (Image *)(ptr->data);
	BLI_strncpy(value, data->name, 1024);
}

int Image_filepath_raw_length(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return strlen(data->name);
}

void Image_filepath_raw_set(PointerRNA *ptr, const char *value)
{
	Image *data = (Image *)(ptr->data);
	BLI_strncpy(data->name, value, 1024);
}

int Image_file_format_get(PointerRNA *ptr)
{
	return rna_Image_file_format_get(ptr);
}

void Image_file_format_set(PointerRNA *ptr, int value)
{
	rna_Image_file_format_set(ptr, value);
}

int Image_source_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->source);
}

void Image_source_set(PointerRNA *ptr, int value)
{
	rna_Image_source_set(ptr, value);
}

int Image_type_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->type);
}

PointerRNA Image_packed_file_get(PointerRNA *ptr)
{
	return rna_Image_packed_file_get(ptr);
}

static PointerRNA Image_packed_files_get(CollectionPropertyIterator *iter)
{
	return rna_pointer_inherit_refine(&iter->parent, &RNA_ImagePackedFile, rna_iterator_listbase_get(iter));
}

void Image_packed_files_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_Image_packed_files;

	rna_iterator_listbase_begin(iter, &data->packedfiles, NULL);

	if (iter->valid)
		iter->ptr = Image_packed_files_get(iter);
}

void Image_packed_files_next(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_next(iter);

	if (iter->valid)
		iter->ptr = Image_packed_files_get(iter);
}

void Image_packed_files_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int Image_packed_files_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
{
	int found = 0;
	CollectionPropertyIterator iter;

	Image_packed_files_begin(&iter, ptr);

	if (iter.valid) {
		ListBaseIterator *internal = &iter.internal.listbase;
		if (internal->skip) {
			while (index-- > 0 && iter.valid) {
				rna_iterator_listbase_next(&iter);
			}
			found = (index == -1 && iter.valid);
		}
		else {
			while (index-- > 0 && internal->link)
				internal->link = internal->link->next;
			found = (index == -1 && internal->link);
		}
		if (found) *r_ptr = Image_packed_files_get(&iter);
	}

	Image_packed_files_end(&iter);

	return found;
}

int Image_packed_files_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	extern int ImagePackedFile_filepath_length(PointerRNA *);
	extern void ImagePackedFile_filepath_get(PointerRNA *, char *);

	bool found = false;
	CollectionPropertyIterator iter;
	char namebuf[1024];
	char *name;

	Image_packed_files_begin(&iter, ptr);

	while (iter.valid) {
		if (iter.ptr.data) {
			int namelen = ImagePackedFile_filepath_length(&iter.ptr);
			if (namelen < 1024) {
				ImagePackedFile_filepath_get(&iter.ptr, namebuf);
				if (strcmp(namebuf, key) == 0) {
					found = true;
					*r_ptr = iter.ptr;
					break;
				}
			}
			else {
				name = MEM_mallocN(namelen+1, "name string");
				ImagePackedFile_filepath_get(&iter.ptr, name);
				if (strcmp(name, key) == 0) {
					MEM_freeN(name);

					found = true;
					*r_ptr = iter.ptr;
					break;
				}
				else {
					MEM_freeN(name);
				}
			}
		}
		Image_packed_files_next(&iter);
	}
	Image_packed_files_end(&iter);

	return found;
}

int Image_field_order_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return ((data->flag) & 2);
}

void Image_field_order_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->flag &= ~2;
	data->flag |= value;
}

int Image_use_fields_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->flag) & 1) != 0);
}

void Image_use_fields_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->flag |= 1;
	else data->flag &= ~1;
}

int Image_use_view_as_render_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->flag) & 2048) != 0);
}

void Image_use_view_as_render_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->flag |= 2048;
	else data->flag &= ~2048;
}

int Image_use_alpha_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return !(((data->flag) & 4096) != 0);
}

void Image_use_alpha_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (!value) data->flag |= 4096;
	else data->flag &= ~4096;
}

int Image_use_deinterlace_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->flag) & 8192) != 0);
}

void Image_use_deinterlace_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->flag |= 8192;
	else data->flag &= ~8192;
}

int Image_use_multiview_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->flag) & 16384) != 0);
}

void Image_use_multiview_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->flag |= 16384;
	else data->flag &= ~16384;
}

int Image_is_stereo_3d_get(PointerRNA *ptr)
{
	return rna_Image_is_stereo_3d_get(ptr);
}

int Image_is_multiview_get(PointerRNA *ptr)
{
	return rna_Image_is_multiview_get(ptr);
}

int Image_is_dirty_get(PointerRNA *ptr)
{
	return rna_Image_dirty_get(ptr);
}

int Image_generated_type_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->gen_type);
}

void Image_generated_type_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->gen_type = value;
}

int Image_generated_width_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->gen_x);
}

void Image_generated_width_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->gen_x = CLAMPIS(value, 1, 65536);
}

int Image_generated_height_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->gen_y);
}

void Image_generated_height_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->gen_y = CLAMPIS(value, 1, 65536);
}

int Image_use_generated_float_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->gen_flag) & 1) != 0);
}

void Image_use_generated_float_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->gen_flag |= 1;
	else data->gen_flag &= ~1;
}

void Image_generated_color_get(PointerRNA *ptr, float values[4])
{
	Image *data = (Image *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 4; i++) {
		values[i] = (float)(((float *)data->gen_color)[i]);
	}
}

void Image_generated_color_set(PointerRNA *ptr, const float values[4])
{
	Image *data = (Image *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 4; i++) {
		((float *)data->gen_color)[i] = CLAMPIS(values[i], 0.0f, FLT_MAX);
	}
}

int Image_mapping_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return ((data->flag) & 16);
}

void Image_mapping_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->flag &= ~16;
	data->flag |= value;
}

void Image_display_aspect_get(PointerRNA *ptr, float values[2])
{
	Image *data = (Image *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 2; i++) {
		values[i] = (float)((&data->aspx)[i]);
	}
}

void Image_display_aspect_set(PointerRNA *ptr, const float values[2])
{
	Image *data = (Image *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 2; i++) {
		(&data->aspx)[i] = CLAMPIS(values[i], 0.1000000015f, FLT_MAX);
	}
}

int Image_use_animation_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->tpageflag) & 2) != 0);
}

void Image_use_animation_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->tpageflag |= 2;
	else data->tpageflag &= ~2;
}

int Image_frame_start_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->twsta);
}

void Image_frame_start_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->twsta = CLAMPIS(value, 0, 255);
}

int Image_frame_end_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->twend);
}

void Image_frame_end_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->twend = CLAMPIS(value, 0, 255);
}

int Image_fps_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->animspeed);
}

void Image_fps_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->animspeed = CLAMPIS(value, 1, 100);
}

int Image_use_tiles_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->tpageflag) & 1) != 0);
}

void Image_use_tiles_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->tpageflag |= 1;
	else data->tpageflag &= ~1;
}

int Image_tiles_x_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->xrep);
}

void Image_tiles_x_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->xrep = CLAMPIS(value, 1, 16);
}

int Image_tiles_y_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->yrep);
}

void Image_tiles_y_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->yrep = CLAMPIS(value, 1, 16);
}

int Image_use_clamp_x_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->tpageflag) & 16) != 0);
}

void Image_use_clamp_x_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->tpageflag |= 16;
	else data->tpageflag &= ~16;
}

int Image_use_clamp_y_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (((data->tpageflag) & 32) != 0);
}

void Image_use_clamp_y_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	if (value) data->tpageflag |= 32;
	else data->tpageflag &= ~32;
}

void Image_bindcode_get(PointerRNA *ptr, int values[2])
{
	Image *data = (Image *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 2; i++) {
		values[i] = (int)(((int *)data->bindcode)[i]);
	}
}

static PointerRNA Image_render_slots_get(CollectionPropertyIterator *iter)
{
	return rna_pointer_inherit_refine(&iter->parent, &RNA_RenderSlot, rna_iterator_array_get(iter));
}

void Image_render_slots_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_Image_render_slots;

	rna_Image_render_slots_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = Image_render_slots_get(iter);
}

void Image_render_slots_next(CollectionPropertyIterator *iter)
{
	rna_iterator_array_next(iter);

	if (iter->valid)
		iter->ptr = Image_render_slots_get(iter);
}

void Image_render_slots_end(CollectionPropertyIterator *iter)
{
	rna_iterator_array_end(iter);
}

int Image_render_slots_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
{
	int found = 0;
	CollectionPropertyIterator iter;

	Image_render_slots_begin(&iter, ptr);

	if (iter.valid) {
		ArrayIterator *internal = &iter.internal.array;
		if (index < 0 || index >= internal->length) {
#ifdef __GNUC__
			printf("Array iterator out of range: %s (index %d)\n", __func__, index);
#else
			printf("Array iterator out of range: (index %d)\n", index);
#endif
		}
		else if (internal->skip) {
			while (index-- > 0 && iter.valid) {
				rna_iterator_array_next(&iter);
			}
			found = (index == -1 && iter.valid);
		}
		else {
			internal->ptr += internal->itemsize * index;
			found = 1;
		}
		if (found) *r_ptr = Image_render_slots_get(&iter);
	}

	Image_render_slots_end(&iter);

	return found;
}

int Image_has_data_get(PointerRNA *ptr)
{
	return rna_Image_has_data_get(ptr);
}

int Image_depth_get(PointerRNA *ptr)
{
	return rna_Image_depth_get(ptr);
}

void Image_size_get(PointerRNA *ptr, int values[2])
{
	rna_Image_size_get(ptr, values);
}

void Image_resolution_get(PointerRNA *ptr, float values[2])
{
	rna_Image_resolution_get(ptr, values);
}

void Image_resolution_set(PointerRNA *ptr, const float values[2])
{
	rna_Image_resolution_set(ptr, values);
}

int Image_frame_duration_get(PointerRNA *ptr)
{
	return rna_Image_frame_duration_get(ptr);
}

void Image_pixels_get(PointerRNA *ptr, float values[])
{
	rna_Image_pixels_get(ptr, values);
}

void Image_pixels_set(PointerRNA *ptr, const float values[])
{
	rna_Image_pixels_set(ptr, values);
}

int Image_channels_get(PointerRNA *ptr)
{
	return rna_Image_channels_get(ptr);
}

int Image_is_float_get(PointerRNA *ptr)
{
	return rna_Image_is_float_get(ptr);
}

PointerRNA Image_colorspace_settings_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return rna_pointer_inherit_refine(ptr, &RNA_ColorManagedInputColorspaceSettings, &data->colorspace_settings);
}

int Image_alpha_mode_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->alpha_mode);
}

void Image_alpha_mode_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->alpha_mode = value;
}

int Image_views_format_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return (int)(data->views_format);
}

void Image_views_format_set(PointerRNA *ptr, int value)
{
	Image *data = (Image *)(ptr->data);
	data->views_format = value;
}

PointerRNA Image_stereo_3d_format_get(PointerRNA *ptr)
{
	Image *data = (Image *)(ptr->data);
	return rna_pointer_inherit_refine(ptr, &RNA_Stereo3dFormat, data->stereo3d_format);
}

static PointerRNA ImageUser_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void ImageUser_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_ImageUser_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = ImageUser_rna_properties_get(iter);
}

void ImageUser_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = ImageUser_rna_properties_get(iter);
}

void ImageUser_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int ImageUser_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA ImageUser_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

int ImageUser_use_auto_refresh_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (((data->flag) & 1) != 0);
}

void ImageUser_use_auto_refresh_set(PointerRNA *ptr, int value)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	if (value) data->flag |= 1;
	else data->flag &= ~1;
}

int ImageUser_frame_current_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->framenr);
}

void ImageUser_frame_current_set(PointerRNA *ptr, int value)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	data->framenr = CLAMPIS(value, -500000, 500000);
}

int ImageUser_use_cyclic_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->cycl);
}

void ImageUser_use_cyclic_set(PointerRNA *ptr, int value)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	data->cycl = value;
}

int ImageUser_frame_duration_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->frames);
}

void ImageUser_frame_duration_set(PointerRNA *ptr, int value)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	data->frames = CLAMPIS(value, 0, 500000);
}

int ImageUser_frame_offset_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->offset);
}

void ImageUser_frame_offset_set(PointerRNA *ptr, int value)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	data->offset = value;
}

int ImageUser_frame_start_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->sfra);
}

void ImageUser_frame_start_set(PointerRNA *ptr, int value)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	data->sfra = CLAMPIS(value, -500000, 500000);
}

int ImageUser_fields_per_frame_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->fie_ima);
}

void ImageUser_fields_per_frame_set(PointerRNA *ptr, int value)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	data->fie_ima = CLAMPIS(value, 1, 200);
}

int ImageUser_multilayer_layer_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->layer);
}

int ImageUser_multilayer_pass_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->pass);
}

int ImageUser_multilayer_view_get(PointerRNA *ptr)
{
	ImageUser *data = (ImageUser *)(ptr->data);
	return (int)(data->view);
}

static PointerRNA ImagePackedFile_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void ImagePackedFile_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_ImagePackedFile_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = ImagePackedFile_rna_properties_get(iter);
}

void ImagePackedFile_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = ImagePackedFile_rna_properties_get(iter);
}

void ImagePackedFile_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int ImagePackedFile_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA ImagePackedFile_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

PointerRNA ImagePackedFile_packed_file_get(PointerRNA *ptr)
{
	ImagePackedFile *data = (ImagePackedFile *)(ptr->data);
	return rna_pointer_inherit_refine(ptr, &RNA_PackedFile, data->packedfile);
}

void ImagePackedFile_filepath_get(PointerRNA *ptr, char *value)
{
	ImagePackedFile *data = (ImagePackedFile *)(ptr->data);
	BLI_strncpy(value, data->filepath, 1024);
}

int ImagePackedFile_filepath_length(PointerRNA *ptr)
{
	ImagePackedFile *data = (ImagePackedFile *)(ptr->data);
	return strlen(data->filepath);
}

void ImagePackedFile_filepath_set(PointerRNA *ptr, const char *value)
{
	ImagePackedFile *data = (ImagePackedFile *)(ptr->data);
	BLI_strncpy(data->filepath, value, 1024);
}



int Image_pixels_get_length(PointerRNA *ptr, int *arraylen)
{
	return rna_Image_pixels_get_length(ptr, arraylen);
}

void Image_save_render(struct Image *_self, bContext *C, ReportList *reports, const char * filepath, struct Scene *scene)
{
	rna_Image_save_render(_self, C, reports, filepath, scene);
}

void Image_save_render_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	const char * filepath;
	struct Scene *scene;
	char *_data;
	
	_self = (struct Image *)_ptr->data;
	_data = (char *)_parms->data;
	filepath = *((const char * *)_data);
	_data += 8;
	scene = *((struct Scene **)_data);
	
	rna_Image_save_render(_self, C, reports, filepath, scene);
}

void Image_save(struct Image *_self, Main *bmain, bContext *C, ReportList *reports)
{
	rna_Image_save(_self, bmain, C, reports);
}

void Image_save_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	_self = (struct Image *)_ptr->data;
	
	rna_Image_save(_self, CTX_data_main(C), C, reports);
}

void Image_pack(struct Image *_self, Main *bmain, bContext *C, ReportList *reports, int as_png, const char * data, int data_len)
{
	rna_Image_pack(_self, bmain, C, reports, as_png, data, data_len);
}

void Image_pack_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	int as_png;
	const char * data;
	int data_len;
	char *_data;
	
	_self = (struct Image *)_ptr->data;
	_data = (char *)_parms->data;
	as_png = *((int *)_data);
	_data += 4;
	data = *((const char * *)_data);
	_data += 8;
	data_len = *((int *)_data);
	
	rna_Image_pack(_self, CTX_data_main(C), C, reports, as_png, data, data_len);
}

void Image_unpack(struct Image *_self, ReportList *reports, int method)
{
	rna_Image_unpack(_self, reports, method);
}

void Image_unpack_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	int method;
	char *_data;
	
	_self = (struct Image *)_ptr->data;
	_data = (char *)_parms->data;
	method = *((int *)_data);
	
	rna_Image_unpack(_self, reports, method);
}

void Image_reload(struct Image *_self)
{
	rna_Image_reload(_self);
}

void Image_reload_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	_self = (struct Image *)_ptr->data;
	
	rna_Image_reload(_self);
}

void Image_update(struct Image *_self, ReportList *reports)
{
	rna_Image_update(_self, reports);
}

void Image_update_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	_self = (struct Image *)_ptr->data;
	
	rna_Image_update(_self, reports);
}

void Image_scale(struct Image *_self, ReportList *reports, int width, int height)
{
	rna_Image_scale(_self, reports, width, height);
}

void Image_scale_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	int width;
	int height;
	char *_data;
	
	_self = (struct Image *)_ptr->data;
	_data = (char *)_parms->data;
	width = *((int *)_data);
	_data += 4;
	height = *((int *)_data);
	
	rna_Image_scale(_self, reports, width, height);
}

int Image_gl_touch(struct Image *_self, ReportList *reports, int frame, int filter, int mag)
{
	return rna_Image_gl_touch(_self, reports, frame, filter, mag);
}

void Image_gl_touch_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	int frame;
	int filter;
	int mag;
	int error;
	char *_data, *_retdata;
	
	_self = (struct Image *)_ptr->data;
	_data = (char *)_parms->data;
	frame = *((int *)_data);
	_data += 4;
	filter = *((int *)_data);
	_data += 4;
	mag = *((int *)_data);
	_data += 4;
	_retdata = _data;
	
	error = rna_Image_gl_touch(_self, reports, frame, filter, mag);
	*((int *)_retdata) = error;
}

int Image_gl_load(struct Image *_self, ReportList *reports, int frame, int filter, int mag)
{
	return rna_Image_gl_load(_self, reports, frame, filter, mag);
}

void Image_gl_load_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	int frame;
	int filter;
	int mag;
	int error;
	char *_data, *_retdata;
	
	_self = (struct Image *)_ptr->data;
	_data = (char *)_parms->data;
	frame = *((int *)_data);
	_data += 4;
	filter = *((int *)_data);
	_data += 4;
	mag = *((int *)_data);
	_data += 4;
	_retdata = _data;
	
	error = rna_Image_gl_load(_self, reports, frame, filter, mag);
	*((int *)_retdata) = error;
}

void Image_gl_free(struct Image *_self)
{
	rna_Image_gl_free(_self);
}

void Image_gl_free_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	_self = (struct Image *)_ptr->data;
	
	rna_Image_gl_free(_self);
}

void Image_filepath_from_user(struct Image *_self, struct ImageUser *image_user, char * filepath)
{
	rna_Image_filepath_from_user(_self, image_user, filepath);
}

void Image_filepath_from_user_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	struct ImageUser *image_user;
	char * filepath;
	char *_data;
	
	_self = (struct Image *)_ptr->data;
	_data = (char *)_parms->data;
	image_user = *((struct ImageUser **)_data);
	_data += 8;
	filepath = ((char * )_data);
	
	rna_Image_filepath_from_user(_self, image_user, filepath);
}

void Image_buffers_free(struct Image *_self)
{
	rna_Image_buffers_free(_self);
}

void Image_buffers_free_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct Image *_self;
	_self = (struct Image *)_ptr->data;
	
	rna_Image_buffers_free(_self);
}

/* Repeated prototypes to detect errors */

void rna_Image_save_render(struct Image *_self, bContext *C, ReportList *reports, const char * filepath, struct Scene *scene);
void rna_Image_save(struct Image *_self, Main *bmain, bContext *C, ReportList *reports);
void rna_Image_pack(struct Image *_self, Main *bmain, bContext *C, ReportList *reports, int as_png, const char * data, int data_len);
void rna_Image_unpack(struct Image *_self, ReportList *reports, int method);
void rna_Image_reload(struct Image *_self);
void rna_Image_update(struct Image *_self, ReportList *reports);
void rna_Image_scale(struct Image *_self, ReportList *reports, int width, int height);
int rna_Image_gl_touch(struct Image *_self, ReportList *reports, int frame, int filter, int mag);
int rna_Image_gl_load(struct Image *_self, ReportList *reports, int frame, int filter, int mag);
void rna_Image_gl_free(struct Image *_self);
void rna_Image_filepath_from_user(struct Image *_self, struct ImageUser *image_user, char * filepath);
void rna_Image_buffers_free(struct Image *_self);


void ImagePackedFile_save(struct ImagePackedFile *_self, ReportList *reports)
{
	rna_ImagePackedFile_save(_self, reports);
}

void ImagePackedFile_save_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct ImagePackedFile *_self;
	_self = (struct ImagePackedFile *)_ptr->data;
	
	rna_ImagePackedFile_save(_self, reports);
}

/* Repeated prototypes to detect errors */

void rna_ImagePackedFile_save(struct ImagePackedFile *_self, ReportList *reports);

/* Render Slot */
CollectionPropertyRNA rna_RenderSlot_rna_properties = {
	{(PropertyRNA *)&rna_RenderSlot_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	RenderSlot_rna_properties_begin, RenderSlot_rna_properties_next, RenderSlot_rna_properties_end, RenderSlot_rna_properties_get, NULL, NULL, RenderSlot_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_RenderSlot_rna_type = {
	{(PropertyRNA *)&rna_RenderSlot_name, (PropertyRNA *)&rna_RenderSlot_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	RenderSlot_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

StringPropertyRNA rna_RenderSlot_name = {
	{NULL, (PropertyRNA *)&rna_RenderSlot_rna_type,
	-1, "name", 262145, 0, 0, "Name",
	"Render slot name",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	RenderSlot_name_get, RenderSlot_name_length, RenderSlot_name_set, NULL, NULL, NULL, 64, ""
};

StructRNA RNA_RenderSlot = {
	{(ContainerRNA *)&RNA_RenderSlots, (ContainerRNA *)&RNA_GroupObjects,
	NULL,
	{(PropertyRNA *)&rna_RenderSlot_rna_properties, (PropertyRNA *)&rna_RenderSlot_name}},
	"RenderSlot", NULL, NULL, 4, "Render Slot",
	"Parameters defining the render slot",
	"*", 17,
	NULL, (PropertyRNA *)&rna_RenderSlot_rna_properties,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Render Slots */
CollectionPropertyRNA rna_RenderSlots_rna_properties = {
	{(PropertyRNA *)&rna_RenderSlots_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	RenderSlots_rna_properties_begin, RenderSlots_rna_properties_next, RenderSlots_rna_properties_end, RenderSlots_rna_properties_get, NULL, NULL, RenderSlots_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_RenderSlots_rna_type = {
	{(PropertyRNA *)&rna_RenderSlots_active, (PropertyRNA *)&rna_RenderSlots_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	RenderSlots_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

PointerPropertyRNA rna_RenderSlots_active = {
	{(PropertyRNA *)&rna_RenderSlots_active_index, (PropertyRNA *)&rna_RenderSlots_rna_type,
	-1, "active", 41943041, 0, 0, "Active",
	"Active render slot of the image",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	RenderSlots_active_get, RenderSlots_active_set, NULL, NULL,&RNA_RenderSlot
};

IntPropertyRNA rna_RenderSlots_active_index = {
	{NULL, (PropertyRNA *)&rna_RenderSlots_active,
	-1, "active_index", 1, 0, 0, "Active Index",
	"Index of an active render slot of the image",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	RenderSlots_active_index_get, RenderSlots_active_index_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 8, 0, 8, 1, 0, NULL
};

StructRNA RNA_RenderSlots = {
	{(ContainerRNA *)&RNA_Image, (ContainerRNA *)&RNA_RenderSlot,
	NULL,
	{(PropertyRNA *)&rna_RenderSlots_rna_properties, (PropertyRNA *)&rna_RenderSlots_active_index}},
	"RenderSlots", NULL, NULL, 4, "Render Slots",
	"Collection of the render slots",
	"*", 17,
	NULL, (PropertyRNA *)&rna_RenderSlots_rna_properties,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Image */
StringPropertyRNA rna_Image_filepath = {
	{(PropertyRNA *)&rna_Image_filepath_raw, NULL,
	-1, "filepath", 262145, 0, 0, "File Name",
	"Image/Movie file name",
	0, "*",
	PROP_STRING, PROP_FILEPATH | PROP_UNIT_NONE, NULL, 0, {1024, 0, 0}, 0,
	rna_Image_reload_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_filepath_get, Image_filepath_length, Image_filepath_set, NULL, NULL, NULL, 1024, ""
};

StringPropertyRNA rna_Image_filepath_raw = {
	{(PropertyRNA *)&rna_Image_file_format, (PropertyRNA *)&rna_Image_filepath,
	-1, "filepath_raw", 262145, 0, 0, "File Name",
	"Image/Movie file name (without data refreshing)",
	0, "*",
	PROP_STRING, PROP_FILEPATH | PROP_UNIT_NONE, NULL, 0, {1024, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_filepath_raw_get, Image_filepath_raw_length, Image_filepath_raw_set, NULL, NULL, NULL, 1024, ""
};

static EnumPropertyItem rna_Image_file_format_items[21] = {
	{0, "", 0, "Image", NULL},
	{20, "BMP", 696, "BMP", "Output image in bitmap format"},
	{1, "IRIS", 696, "Iris", "Output image in (old!) SGI IRIS format"},
	{17, "PNG", 696, "PNG", "Output image in PNG format"},
	{4, "JPEG", 696, "JPEG", "Output image in JPEG format"},
	{30, "JPEG2000", 696, "JPEG 2000", "Output image in JPEG 2000 format"},
	{0, "TARGA", 696, "Targa", "Output image in Targa format"},
	{14, "TARGA_RAW", 696, "Targa Raw", "Output image in uncompressed Targa format"},
	{0, "", 0, " ", NULL},
	{26, "CINEON", 696, "Cineon", "Output image in Cineon format"},
	{27, "DPX", 696, "DPX", "Output image in DPX format"},
	{28, "OPEN_EXR_MULTILAYER", 696, "OpenEXR MultiLayer", "Output image in multilayer OpenEXR format"},
	{23, "OPEN_EXR", 696, "OpenEXR", "Output image in OpenEXR format"},
	{21, "HDR", 696, "Radiance HDR", "Output image in Radiance HDR format"},
	{22, "TIFF", 696, "TIFF", "Output image in TIFF format"},
	{0, "", 0, "Movie", NULL},
	{16, "AVI_JPEG", 697, "AVI JPEG", "Output video in AVI JPEG format"},
	{15, "AVI_RAW", 697, "AVI Raw", "Output video in AVI Raw format"},
	{25, "FRAMESERVER", 698, "Frame Server", "Output image to a frameserver"},
	{24, "FFMPEG", 697, "FFmpeg video", "The most versatile way to output video files"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_file_format = {
	{(PropertyRNA *)&rna_Image_source, (PropertyRNA *)&rna_Image_filepath_raw,
	-1, "file_format", 3, 0, 0, "File Format",
	"Format used for re-saving this file",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_file_format_get, Image_file_format_set, NULL, NULL, NULL, NULL, rna_Image_file_format_items, 20, 0
};

static EnumPropertyItem rna_Image_source_items[6] = {
	{1, "FILE", 0, "Single Image", "Single image file"},
	{2, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"},
	{3, "MOVIE", 0, "Movie", "Movie file"},
	{4, "GENERATED", 0, "Generated", "Generated image"},
	{5, "VIEWER", 0, "Viewer", "Compositing node viewer"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_source = {
	{(PropertyRNA *)&rna_Image_type, (PropertyRNA *)&rna_Image_file_format,
	-1, "source", 3, 0, 0, "Source",
	"Where the image comes from",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_source_get, Image_source_set, rna_Image_source_itemf, NULL, NULL, NULL, rna_Image_source_items, 5, 1
};

static EnumPropertyItem rna_Image_type_items[6] = {
	{0, "IMAGE", 0, "Image", ""},
	{1, "MULTILAYER", 0, "Multilayer", ""},
	{2, "UV_TEST", 0, "UV Test", ""},
	{4, "RENDER_RESULT", 0, "Render Result", ""},
	{5, "COMPOSITING", 0, "Compositing", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_type = {
	{(PropertyRNA *)&rna_Image_packed_file, (PropertyRNA *)&rna_Image_source,
	-1, "type", 2, 0, 0, "Type",
	"How to generate the image",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_type_get, NULL, NULL, NULL, NULL, NULL, rna_Image_type_items, 5, 0
};

PointerPropertyRNA rna_Image_packed_file = {
	{(PropertyRNA *)&rna_Image_packed_files, (PropertyRNA *)&rna_Image_type,
	-1, "packed_file", 8388608, 0, 0, "Packed File",
	"First packed file of the image",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_packed_file_get, NULL, NULL, NULL,&RNA_PackedFile
};

CollectionPropertyRNA rna_Image_packed_files = {
	{(PropertyRNA *)&rna_Image_field_order, (PropertyRNA *)&rna_Image_packed_file,
	-1, "packed_files", 0, 0, 0, "Packed Files",
	"Collection of packed images",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_packed_files_begin, Image_packed_files_next, Image_packed_files_end, Image_packed_files_get, NULL, Image_packed_files_lookup_int, Image_packed_files_lookup_string, NULL, &RNA_ImagePackedFile
};

static EnumPropertyItem rna_Image_field_order_items[3] = {
	{0, "EVEN", 0, "Upper First", "Upper field first"},
	{2, "ODD", 0, "Lower First", "Lower field first"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_field_order = {
	{(PropertyRNA *)&rna_Image_use_fields, (PropertyRNA *)&rna_Image_packed_files,
	-1, "field_order", 3, 0, 0, "Field Order",
	"Order of video fields (select which lines are displayed first)",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_field_order_get, Image_field_order_set, NULL, NULL, NULL, NULL, rna_Image_field_order_items, 2, 0
};

BoolPropertyRNA rna_Image_use_fields = {
	{(PropertyRNA *)&rna_Image_use_view_as_render, (PropertyRNA *)&rna_Image_field_order,
	-1, "use_fields", 1, 0, 0, "Fields",
	"Use fields of the image",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_fields_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_fields_get, Image_use_fields_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_use_view_as_render = {
	{(PropertyRNA *)&rna_Image_use_alpha, (PropertyRNA *)&rna_Image_use_fields,
	-1, "use_view_as_render", 3, 0, 0, "View as Render",
	"Apply render part of display transformation when displaying this image on the screen",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_view_as_render_get, Image_use_view_as_render_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_use_alpha = {
	{(PropertyRNA *)&rna_Image_use_deinterlace, (PropertyRNA *)&rna_Image_use_view_as_render,
	-1, "use_alpha", 3, 0, 0, "Use Alpha",
	"Use the alpha channel information from the image or make image fully opaque",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_colormanage_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_alpha_get, Image_use_alpha_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_use_deinterlace = {
	{(PropertyRNA *)&rna_Image_use_multiview, (PropertyRNA *)&rna_Image_use_alpha,
	-1, "use_deinterlace", 3, 0, 0, "Deinterlace",
	"Deinterlace movie file on load",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_reload_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_deinterlace_get, Image_use_deinterlace_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_use_multiview = {
	{(PropertyRNA *)&rna_Image_is_stereo_3d, (PropertyRNA *)&rna_Image_use_deinterlace,
	-1, "use_multiview", 3, 0, 0, "Use Multi-View",
	"Use Multiple Views (when available)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_views_format_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_multiview_get, Image_use_multiview_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_is_stereo_3d = {
	{(PropertyRNA *)&rna_Image_is_multiview, (PropertyRNA *)&rna_Image_use_multiview,
	-1, "is_stereo_3d", 2, 0, 0, "Stereo 3D",
	"Image has left and right views",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_is_stereo_3d_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_is_multiview = {
	{(PropertyRNA *)&rna_Image_is_dirty, (PropertyRNA *)&rna_Image_is_stereo_3d,
	-1, "is_multiview", 2, 0, 0, "Multiple Views",
	"Image has more than one view",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_is_multiview_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_is_dirty = {
	{(PropertyRNA *)&rna_Image_generated_type, (PropertyRNA *)&rna_Image_is_multiview,
	-1, "is_dirty", 2, 0, 0, "Dirty",
	"Image has changed and is not saved",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_is_dirty_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

static EnumPropertyItem rna_Image_generated_type_items[4] = {
	{0, "BLANK", 0, "Blank", "Generate a blank image"},
	{1, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"},
	{2, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_generated_type = {
	{(PropertyRNA *)&rna_Image_generated_width, (PropertyRNA *)&rna_Image_is_dirty,
	-1, "generated_type", 1, 0, 0, "Generated Type",
	"Generated image type",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_generated_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_generated_type_get, Image_generated_type_set, NULL, NULL, NULL, NULL, rna_Image_generated_type_items, 3, 0
};

IntPropertyRNA rna_Image_generated_width = {
	{(PropertyRNA *)&rna_Image_generated_height, (PropertyRNA *)&rna_Image_generated_type,
	-1, "generated_width", 67108865, 0, 4, "Generated Width",
	"Generated image width",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_generated_update, 171114496, NULL, NULL,
	offsetof(Image, gen_x), 0, NULL},
	Image_generated_width_get, Image_generated_width_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 65536, 1, 65536, 1, 0, NULL
};

IntPropertyRNA rna_Image_generated_height = {
	{(PropertyRNA *)&rna_Image_use_generated_float, (PropertyRNA *)&rna_Image_generated_width,
	-1, "generated_height", 67108865, 0, 4, "Generated Height",
	"Generated image height",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_generated_update, 171114496, NULL, NULL,
	offsetof(Image, gen_y), 0, NULL},
	Image_generated_height_get, Image_generated_height_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 65536, 1, 65536, 1, 0, NULL
};

BoolPropertyRNA rna_Image_use_generated_float = {
	{(PropertyRNA *)&rna_Image_generated_color, (PropertyRNA *)&rna_Image_generated_height,
	-1, "use_generated_float", 1, 0, 0, "Float Buffer",
	"Generate floating point buffer",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_generated_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_generated_float_get, Image_use_generated_float_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

static float rna_Image_generated_color_default[4] = {
	0.0f,
	0.0f,
	0.0f,
	0.0f
};

FloatPropertyRNA rna_Image_generated_color = {
	{(PropertyRNA *)&rna_Image_mapping, (PropertyRNA *)&rna_Image_use_generated_float,
	-1, "generated_color", 1, 0, 4, "Color",
	"Fill color for the generated image",
	0, "*",
	PROP_FLOAT, PROP_COLOR_GAMMA | PROP_UNIT_NONE, NULL, 1, {4, 0, 0}, 4,
	rna_Image_generated_update, 171114496, NULL, NULL,
	offsetof(Image, gen_color), 4, NULL},
	NULL, NULL, Image_generated_color_get, Image_generated_color_set, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, FLT_MAX, 10.0f, 3, 0.0f, rna_Image_generated_color_default
};

static EnumPropertyItem rna_Image_mapping_items[3] = {
	{0, "UV", 0, "UV Coordinates", "Use UV coordinates for mapping the image"},
	{16, "REFLECTION", 0, "Reflection", "Use reflection mapping for mapping the image"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_mapping = {
	{(PropertyRNA *)&rna_Image_display_aspect, (PropertyRNA *)&rna_Image_generated_color,
	-1, "mapping", 3, 0, 0, "Mapping",
	"Mapping type to use for this image in the game engine",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_mapping_get, Image_mapping_set, NULL, NULL, NULL, NULL, rna_Image_mapping_items, 2, 0
};

static float rna_Image_display_aspect_default[2] = {
	0.0f,
	0.0f
};

FloatPropertyRNA rna_Image_display_aspect = {
	{(PropertyRNA *)&rna_Image_use_animation, (PropertyRNA *)&rna_Image_mapping,
	-1, "display_aspect", 3, 0, 4, "Display Aspect",
	"Display Aspect for this image, does not affect rendering",
	0, "*",
	PROP_FLOAT, PROP_XYZ | PROP_UNIT_NONE, NULL, 1, {2, 0, 0}, 2,
	NULL, 171114496, NULL, NULL,
	offsetof(Image, aspx), 4, NULL},
	NULL, NULL, Image_display_aspect_get, Image_display_aspect_set, NULL, NULL, NULL, NULL, NULL, NULL, 0.1000000015f, 5000.0f, 0.1000000015f, FLT_MAX, 1.0f, 2, 0.0f, rna_Image_display_aspect_default
};

BoolPropertyRNA rna_Image_use_animation = {
	{(PropertyRNA *)&rna_Image_frame_start, (PropertyRNA *)&rna_Image_display_aspect,
	-1, "use_animation", 3, 0, 0, "Animated",
	"Use as animated texture in the game engine",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_animated_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_animation_get, Image_use_animation_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_Image_frame_start = {
	{(PropertyRNA *)&rna_Image_frame_end, (PropertyRNA *)&rna_Image_use_animation,
	-1, "frame_start", 3, 0, 4, "Animation Start",
	"Start frame of an animated texture",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_animated_update, 171114496, NULL, NULL,
	offsetof(Image, twsta), 1, NULL},
	Image_frame_start_get, Image_frame_start_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 255, 0, 255, 1, 0, NULL
};

IntPropertyRNA rna_Image_frame_end = {
	{(PropertyRNA *)&rna_Image_fps, (PropertyRNA *)&rna_Image_frame_start,
	-1, "frame_end", 3, 0, 4, "Animation End",
	"End frame of an animated texture",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_animated_update, 171114496, NULL, NULL,
	offsetof(Image, twend), 1, NULL},
	Image_frame_end_get, Image_frame_end_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 255, 0, 255, 1, 0, NULL
};

IntPropertyRNA rna_Image_fps = {
	{(PropertyRNA *)&rna_Image_use_tiles, (PropertyRNA *)&rna_Image_frame_end,
	-1, "fps", 3, 0, 4, "Animation Speed",
	"Speed of the animation in frames per second",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	offsetof(Image, animspeed), 1, NULL},
	Image_fps_get, Image_fps_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 100, 1, 100, 1, 0, NULL
};

BoolPropertyRNA rna_Image_use_tiles = {
	{(PropertyRNA *)&rna_Image_tiles_x, (PropertyRNA *)&rna_Image_fps,
	-1, "use_tiles", 3, 0, 0, "Tiles",
	"Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_tiles_get, Image_use_tiles_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_Image_tiles_x = {
	{(PropertyRNA *)&rna_Image_tiles_y, (PropertyRNA *)&rna_Image_use_tiles,
	-1, "tiles_x", 3, 0, 4, "Tiles X",
	"Degree of repetition in the X direction",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	offsetof(Image, xrep), 1, NULL},
	Image_tiles_x_get, Image_tiles_x_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 16, 1, 16, 1, 0, NULL
};

IntPropertyRNA rna_Image_tiles_y = {
	{(PropertyRNA *)&rna_Image_use_clamp_x, (PropertyRNA *)&rna_Image_tiles_x,
	-1, "tiles_y", 3, 0, 4, "Tiles Y",
	"Degree of repetition in the Y direction",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	offsetof(Image, yrep), 1, NULL},
	Image_tiles_y_get, Image_tiles_y_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 16, 1, 16, 1, 0, NULL
};

BoolPropertyRNA rna_Image_use_clamp_x = {
	{(PropertyRNA *)&rna_Image_use_clamp_y, (PropertyRNA *)&rna_Image_tiles_y,
	-1, "use_clamp_x", 3, 0, 0, "Clamp X",
	"Disable texture repeating horizontally",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_clamp_x_get, Image_use_clamp_x_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Image_use_clamp_y = {
	{(PropertyRNA *)&rna_Image_bindcode, (PropertyRNA *)&rna_Image_use_clamp_x,
	-1, "use_clamp_y", 3, 0, 0, "Clamp Y",
	"Disable texture repeating vertically",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_use_clamp_y_get, Image_use_clamp_y_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

static int rna_Image_bindcode_default[2] = {
	0,
	0
};

IntPropertyRNA rna_Image_bindcode = {
	{(PropertyRNA *)&rna_Image_render_slots, (PropertyRNA *)&rna_Image_use_clamp_y,
	-1, "bindcode", 2, 0, 4, "Bindcode",
	"OpenGL bindcode",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 1, {2, 0, 0}, 2,
	NULL, 171114496, NULL, NULL,
	offsetof(Image, bindcode), 0, NULL},
	NULL, NULL, Image_bindcode_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 10000, 0, INT_MAX, 1, 0, rna_Image_bindcode_default
};

CollectionPropertyRNA rna_Image_render_slots = {
	{(PropertyRNA *)&rna_Image_has_data, (PropertyRNA *)&rna_Image_bindcode,
	-1, "render_slots", 0, 0, 8, "Render Slots",
	"Render slots of the image",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {8, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, &RNA_RenderSlots},
	Image_render_slots_begin, Image_render_slots_next, Image_render_slots_end, Image_render_slots_get, NULL, Image_render_slots_lookup_int, NULL, NULL, &RNA_RenderSlot
};

BoolPropertyRNA rna_Image_has_data = {
	{(PropertyRNA *)&rna_Image_depth, (PropertyRNA *)&rna_Image_render_slots,
	-1, "has_data", 2, 0, 0, "Has data",
	"True if this image has data",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_has_data_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_Image_depth = {
	{(PropertyRNA *)&rna_Image_size, (PropertyRNA *)&rna_Image_has_data,
	-1, "depth", 2, 0, 0, "Depth",
	"Image bit depth",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_depth_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 10000, 0, INT_MAX, 1, 0, NULL
};

static int rna_Image_size_default[2] = {
	0,
	0
};

IntPropertyRNA rna_Image_size = {
	{(PropertyRNA *)&rna_Image_resolution, (PropertyRNA *)&rna_Image_depth,
	-1, "size", 2, 0, 0, "Size",
	"Width and height in pixels, zero when image data cant be loaded",
	0, "*",
	PROP_INT, PROP_PIXEL | PROP_UNIT_NONE, NULL, 1, {2, 0, 0}, 2,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, Image_size_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 0, INT_MIN, INT_MAX, 1, 0, rna_Image_size_default
};

static float rna_Image_resolution_default[2] = {
	0.0f,
	0.0f
};

FloatPropertyRNA rna_Image_resolution = {
	{(PropertyRNA *)&rna_Image_frame_duration, (PropertyRNA *)&rna_Image_size,
	-1, "resolution", 3, 0, 0, "Resolution",
	"X/Y pixels per meter",
	0, "*",
	PROP_FLOAT, PROP_XYZ | PROP_UNIT_NONE, NULL, 1, {2, 0, 0}, 2,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, Image_resolution_get, Image_resolution_set, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 0.0f, -FLT_MAX, FLT_MAX, 1.0f, 3, 0.0f, rna_Image_resolution_default
};

IntPropertyRNA rna_Image_frame_duration = {
	{(PropertyRNA *)&rna_Image_pixels, (PropertyRNA *)&rna_Image_resolution,
	-1, "frame_duration", 2, 0, 0, "Duration",
	"Duration (in frames) of the image (1 when not a video/sequence)",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_frame_duration_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 10000, 0, INT_MAX, 1, 0, NULL
};

FloatPropertyRNA rna_Image_pixels = {
	{(PropertyRNA *)&rna_Image_channels, (PropertyRNA *)&rna_Image_frame_duration,
	-1, "pixels", 131075, 0, 0, "Pixels",
	"Image pixels in floating point values",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, rna_Image_pixels_get_length, 1, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, Image_pixels_get, Image_pixels_set, NULL, NULL, NULL, NULL, NULL, NULL, -10000.0f, 10000.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

IntPropertyRNA rna_Image_channels = {
	{(PropertyRNA *)&rna_Image_is_float, (PropertyRNA *)&rna_Image_pixels,
	-1, "channels", 2, 0, 0, "Channels",
	"Number of channels in pixels buffer",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_channels_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 10000, 0, INT_MAX, 1, 0, NULL
};

BoolPropertyRNA rna_Image_is_float = {
	{(PropertyRNA *)&rna_Image_colorspace_settings, (PropertyRNA *)&rna_Image_channels,
	-1, "is_float", 2, 0, 0, "Is Float",
	"True if this image is stored in float buffer",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_is_float_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

PointerPropertyRNA rna_Image_colorspace_settings = {
	{(PropertyRNA *)&rna_Image_alpha_mode, (PropertyRNA *)&rna_Image_is_float,
	-1, "colorspace_settings", 8388608, 0, 0, "Color Space Settings",
	"Input color space settings",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_colorspace_settings_get, NULL, NULL, NULL,&RNA_ColorManagedInputColorspaceSettings
};

static EnumPropertyItem rna_Image_alpha_mode_items[3] = {
	{0, "STRAIGHT", 0, "Straight", "Transparent RGB and alpha pixels are unmodified"},
	{1, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_alpha_mode = {
	{(PropertyRNA *)&rna_Image_views_format, (PropertyRNA *)&rna_Image_colorspace_settings,
	-1, "alpha_mode", 3, 0, 0, "Alpha Mode",
	"Representation of alpha information in the RGBA pixels",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_colormanage_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_alpha_mode_get, Image_alpha_mode_set, NULL, NULL, NULL, NULL, rna_Image_alpha_mode_items, 2, 0
};

static EnumPropertyItem rna_Image_views_format_items[3] = {
	{0, "INDIVIDUAL", 0, "Individual", "Individual files for each view with the prefix as defined by the scene views"},
	{1, "STEREO_3D", 0, "Stereo 3D", "Single file with an encoded stereo pair"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_views_format = {
	{(PropertyRNA *)&rna_Image_stereo_3d_format, (PropertyRNA *)&rna_Image_alpha_mode,
	-1, "views_format", 3, 0, 0, "Views Format",
	"Mode to load image views",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_Image_views_format_update, 171114496, NULL, NULL,
	0, -1, NULL},
	Image_views_format_get, Image_views_format_set, NULL, NULL, NULL, NULL, rna_Image_views_format_items, 2, 0
};

PointerPropertyRNA rna_Image_stereo_3d_format = {
	{NULL, (PropertyRNA *)&rna_Image_views_format,
	-1, "stereo_3d_format", 8650752, 0, 0, "Stereo 3D Format",
	"Settings for stereo 3d",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Image_stereo_3d_format_get, NULL, NULL, NULL,&RNA_Stereo3dFormat
};

StringPropertyRNA rna_Image_save_render_filepath = {
	{(PropertyRNA *)&rna_Image_save_render_scene, NULL,
	-1, "filepath", 262145, 1, 0, "",
	"Save path",
	0, "*",
	PROP_STRING, PROP_FILEPATH | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, 0, ""
};

PointerPropertyRNA rna_Image_save_render_scene = {
	{NULL, (PropertyRNA *)&rna_Image_save_render_filepath,
	-1, "scene", 8388608, 0, 0, "",
	"Scene to take image parameters from",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL,&RNA_Scene
};

FunctionRNA rna_Image_save_render_func = {
	{(FunctionRNA *)&rna_Image_save_func, NULL,
	NULL,
	{(PropertyRNA *)&rna_Image_save_render_filepath, (PropertyRNA *)&rna_Image_save_render_scene}},
	"save_render", 24, "Save image to a specific path using a scenes render settings",
	Image_save_render_call,
	NULL
};

FunctionRNA rna_Image_save_func = {
	{(FunctionRNA *)&rna_Image_pack_func, (FunctionRNA *)&rna_Image_save_render_func,
	NULL,
	{NULL, NULL}},
	"save", 28, "Save image to its source path",
	Image_save_call,
	NULL
};

BoolPropertyRNA rna_Image_pack_as_png = {
	{(PropertyRNA *)&rna_Image_pack_data, NULL,
	-1, "as_png", 3, 0, 0, "as_png",
	"Pack the image as PNG (needed for generated/dirty images)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

StringPropertyRNA rna_Image_pack_data = {
	{(PropertyRNA *)&rna_Image_pack_data_len, (PropertyRNA *)&rna_Image_pack_as_png,
	-1, "data", 262145, 0, 0, "data",
	"Raw data (bytes, exact content of the embedded file)",
	0, "*",
	PROP_STRING, PROP_BYTESTRING | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, 0, ""
};

IntPropertyRNA rna_Image_pack_data_len = {
	{NULL, (PropertyRNA *)&rna_Image_pack_data,
	-1, "data_len", 3, 0, 0, "data_len",
	"length of given data (mandatory if data is provided)",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, INT_MAX, 0, INT_MAX, 1, 0, NULL
};

FunctionRNA rna_Image_pack_func = {
	{(FunctionRNA *)&rna_Image_unpack_func, (FunctionRNA *)&rna_Image_save_func,
	NULL,
	{(PropertyRNA *)&rna_Image_pack_as_png, (PropertyRNA *)&rna_Image_pack_data_len}},
	"pack", 28, "Pack an image as embedded data into the .blend file",
	Image_pack_call,
	NULL
};

static EnumPropertyItem rna_Image_unpack_method_items[5] = {
	{5, "USE_LOCAL", 0, "Use Local File", ""},
	{4, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""},
	{6, "USE_ORIGINAL", 0, "Use Original File", ""},
	{3, "WRITE_ORIGINAL", 0, "Write Original File (overwrite existing)", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Image_unpack_method = {
	{NULL, NULL,
	-1, "method", 3, 0, 0, "method",
	"How to unpack",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, rna_Image_unpack_method_items, 4, 5
};

FunctionRNA rna_Image_unpack_func = {
	{(FunctionRNA *)&rna_Image_reload_func, (FunctionRNA *)&rna_Image_pack_func,
	NULL,
	{(PropertyRNA *)&rna_Image_unpack_method, (PropertyRNA *)&rna_Image_unpack_method}},
	"unpack", 16, "Save an image packed in the .blend file to disk",
	Image_unpack_call,
	NULL
};

FunctionRNA rna_Image_reload_func = {
	{(FunctionRNA *)&rna_Image_update_func, (FunctionRNA *)&rna_Image_unpack_func,
	NULL,
	{NULL, NULL}},
	"reload", 0, "Reload the image from its source path",
	Image_reload_call,
	NULL
};

FunctionRNA rna_Image_update_func = {
	{(FunctionRNA *)&rna_Image_scale_func, (FunctionRNA *)&rna_Image_reload_func,
	NULL,
	{NULL, NULL}},
	"update", 16, "Update the display image from the floating point buffer",
	Image_update_call,
	NULL
};

IntPropertyRNA rna_Image_scale_width = {
	{(PropertyRNA *)&rna_Image_scale_height, NULL,
	-1, "width", 3, 1, 0, "",
	"Width",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 10000, 1, 10000, 1, 1, NULL
};

IntPropertyRNA rna_Image_scale_height = {
	{NULL, (PropertyRNA *)&rna_Image_scale_width,
	-1, "height", 3, 1, 0, "",
	"Height",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 10000, 1, 10000, 1, 1, NULL
};

FunctionRNA rna_Image_scale_func = {
	{(FunctionRNA *)&rna_Image_gl_touch_func, (FunctionRNA *)&rna_Image_update_func,
	NULL,
	{(PropertyRNA *)&rna_Image_scale_width, (PropertyRNA *)&rna_Image_scale_height}},
	"scale", 16, "Scale the image in pixels",
	Image_scale_call,
	NULL
};

IntPropertyRNA rna_Image_gl_touch_frame = {
	{(PropertyRNA *)&rna_Image_gl_touch_filter, NULL,
	-1, "frame", 3, 0, 0, "Frame",
	"Frame of image sequence or movie",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, INT_MAX, 0, INT_MAX, 1, 0, NULL
};

IntPropertyRNA rna_Image_gl_touch_filter = {
	{(PropertyRNA *)&rna_Image_gl_touch_mag, (PropertyRNA *)&rna_Image_gl_touch_frame,
	-1, "filter", 3, 0, 0, "Filter",
	"The texture minifying function to use if the image wasn\'t loaded",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-2147483647, INT_MAX, -2147483647, INT_MAX, 1, 9985, NULL
};

IntPropertyRNA rna_Image_gl_touch_mag = {
	{(PropertyRNA *)&rna_Image_gl_touch_error, (PropertyRNA *)&rna_Image_gl_touch_filter,
	-1, "mag", 3, 0, 0, "Magnification",
	"The texture magnification function to use if the image wasn\'t loaded",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-2147483647, INT_MAX, -2147483647, INT_MAX, 1, 9729, NULL
};

IntPropertyRNA rna_Image_gl_touch_error = {
	{NULL, (PropertyRNA *)&rna_Image_gl_touch_mag,
	-1, "error", 3, 2, 0, "Error",
	"OpenGL error value",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-2147483647, INT_MAX, -2147483647, INT_MAX, 1, 0, NULL
};

FunctionRNA rna_Image_gl_touch_func = {
	{(FunctionRNA *)&rna_Image_gl_load_func, (FunctionRNA *)&rna_Image_scale_func,
	NULL,
	{(PropertyRNA *)&rna_Image_gl_touch_frame, (PropertyRNA *)&rna_Image_gl_touch_error}},
	"gl_touch", 16, "Delay the image from being cleaned from the cache due inactivity",
	Image_gl_touch_call,
	(PropertyRNA *)&rna_Image_gl_touch_error
};

IntPropertyRNA rna_Image_gl_load_frame = {
	{(PropertyRNA *)&rna_Image_gl_load_filter, NULL,
	-1, "frame", 3, 0, 0, "Frame",
	"Frame of image sequence or movie",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, INT_MAX, 0, INT_MAX, 1, 0, NULL
};

IntPropertyRNA rna_Image_gl_load_filter = {
	{(PropertyRNA *)&rna_Image_gl_load_mag, (PropertyRNA *)&rna_Image_gl_load_frame,
	-1, "filter", 3, 0, 0, "Filter",
	"The texture minifying function",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-2147483647, INT_MAX, -2147483647, INT_MAX, 1, 9985, NULL
};

IntPropertyRNA rna_Image_gl_load_mag = {
	{(PropertyRNA *)&rna_Image_gl_load_error, (PropertyRNA *)&rna_Image_gl_load_filter,
	-1, "mag", 3, 0, 0, "Magnification",
	"The texture magnification function",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-2147483647, INT_MAX, -2147483647, INT_MAX, 1, 9729, NULL
};

IntPropertyRNA rna_Image_gl_load_error = {
	{NULL, (PropertyRNA *)&rna_Image_gl_load_mag,
	-1, "error", 3, 2, 0, "Error",
	"OpenGL error value",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-2147483647, INT_MAX, -2147483647, INT_MAX, 1, 0, NULL
};

FunctionRNA rna_Image_gl_load_func = {
	{(FunctionRNA *)&rna_Image_gl_free_func, (FunctionRNA *)&rna_Image_gl_touch_func,
	NULL,
	{(PropertyRNA *)&rna_Image_gl_load_frame, (PropertyRNA *)&rna_Image_gl_load_error}},
	"gl_load", 16, "Load the image into OpenGL graphics memory",
	Image_gl_load_call,
	(PropertyRNA *)&rna_Image_gl_load_error
};

FunctionRNA rna_Image_gl_free_func = {
	{(FunctionRNA *)&rna_Image_filepath_from_user_func, (FunctionRNA *)&rna_Image_gl_load_func,
	NULL,
	{NULL, NULL}},
	"gl_free", 0, "Free the image from OpenGL graphics memory",
	Image_gl_free_call,
	NULL
};

PointerPropertyRNA rna_Image_filepath_from_user_image_user = {
	{(PropertyRNA *)&rna_Image_filepath_from_user_filepath, NULL,
	-1, "image_user", 8388608, 0, 0, "",
	"Image user of the image to get filepath for",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL,&RNA_ImageUser
};

StringPropertyRNA rna_Image_filepath_from_user_filepath = {
	{NULL, (PropertyRNA *)&rna_Image_filepath_from_user_image_user,
	-1, "filepath", 8650753, 2, 0, "File Path",
	"The resulting filepath from the image and it\'s user",
	0, "*",
	PROP_STRING, PROP_FILEPATH | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, 1024, ""
};

FunctionRNA rna_Image_filepath_from_user_func = {
	{(FunctionRNA *)&rna_Image_buffers_free_func, (FunctionRNA *)&rna_Image_gl_free_func,
	NULL,
	{(PropertyRNA *)&rna_Image_filepath_from_user_image_user, (PropertyRNA *)&rna_Image_filepath_from_user_filepath}},
	"filepath_from_user", 0, "Return the absolute path to the filepath of an image frame specified by the image user",
	Image_filepath_from_user_call,
	NULL
};

FunctionRNA rna_Image_buffers_free_func = {
	{NULL, (FunctionRNA *)&rna_Image_filepath_from_user_func,
	NULL,
	{NULL, NULL}},
	"buffers_free", 0, "Free the image buffers from memory",
	Image_buffers_free_call,
	NULL
};

StructRNA RNA_Image = {
	{(ContainerRNA *)&RNA_ImageUser, (ContainerRNA *)&RNA_RenderSlots,
	NULL,
	{(PropertyRNA *)&rna_Image_filepath, (PropertyRNA *)&rna_Image_stereo_3d_format}},
	"Image", NULL, NULL, 7, "Image",
	"Image data-block referencing an external or packed image",
	"*", 183,
	(PropertyRNA *)&rna_ID_name, (PropertyRNA *)&rna_ID_rna_properties,
	&RNA_ID,
	NULL,
	rna_ID_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	rna_ID_idprops,
	{(FunctionRNA *)&rna_Image_save_render_func, (FunctionRNA *)&rna_Image_buffers_free_func}
};

/* Image User */
CollectionPropertyRNA rna_ImageUser_rna_properties = {
	{(PropertyRNA *)&rna_ImageUser_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	ImageUser_rna_properties_begin, ImageUser_rna_properties_next, ImageUser_rna_properties_end, ImageUser_rna_properties_get, NULL, NULL, ImageUser_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_ImageUser_rna_type = {
	{(PropertyRNA *)&rna_ImageUser_use_auto_refresh, (PropertyRNA *)&rna_ImageUser_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	ImageUser_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

BoolPropertyRNA rna_ImageUser_use_auto_refresh = {
	{(PropertyRNA *)&rna_ImageUser_frame_current, (PropertyRNA *)&rna_ImageUser_rna_type,
	-1, "use_auto_refresh", 1, 0, 0, "Auto Refresh",
	"Always refresh image on frame changes",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_ImageUser_update, 0, NULL, NULL,
	0, -1, NULL},
	ImageUser_use_auto_refresh_get, ImageUser_use_auto_refresh_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_ImageUser_frame_current = {
	{(PropertyRNA *)&rna_ImageUser_use_cyclic, (PropertyRNA *)&rna_ImageUser_use_auto_refresh,
	-1, "frame_current", 3, 0, 4, "Current Frame",
	"Current frame number in image sequence or movie",
	0, "*",
	PROP_INT, PROP_TIME | PROP_UNIT_TIME, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	offsetof(ImageUser, framenr), 0, NULL},
	ImageUser_frame_current_get, ImageUser_frame_current_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-500000, 500000, -500000, 500000, 1, 0, NULL
};

BoolPropertyRNA rna_ImageUser_use_cyclic = {
	{(PropertyRNA *)&rna_ImageUser_frame_duration, (PropertyRNA *)&rna_ImageUser_frame_current,
	-1, "use_cyclic", 1, 0, 4, "Cyclic",
	"Cycle the images in the movie",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_ImageUser_update, 0, NULL, NULL,
	offsetof(ImageUser, cycl), 2, NULL},
	ImageUser_use_cyclic_get, ImageUser_use_cyclic_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_ImageUser_frame_duration = {
	{(PropertyRNA *)&rna_ImageUser_frame_offset, (PropertyRNA *)&rna_ImageUser_use_cyclic,
	-1, "frame_duration", 1, 0, 4, "Frames",
	"Number of images of a movie to use",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_ImageUser_update, 0, NULL, NULL,
	offsetof(ImageUser, frames), 0, NULL},
	ImageUser_frame_duration_get, ImageUser_frame_duration_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 500000, 0, 500000, 1, 0, NULL
};

IntPropertyRNA rna_ImageUser_frame_offset = {
	{(PropertyRNA *)&rna_ImageUser_frame_start, (PropertyRNA *)&rna_ImageUser_frame_duration,
	-1, "frame_offset", 3, 0, 4, "Offset",
	"Offset the number of the frame to use in the animation",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_ImageUser_update, 0, NULL, NULL,
	offsetof(ImageUser, offset), 0, NULL},
	ImageUser_frame_offset_get, ImageUser_frame_offset_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-10000, 10000, INT_MIN, INT_MAX, 1, 0, NULL
};

IntPropertyRNA rna_ImageUser_frame_start = {
	{(PropertyRNA *)&rna_ImageUser_fields_per_frame, (PropertyRNA *)&rna_ImageUser_frame_offset,
	-1, "frame_start", 1, 0, 4, "Start Frame",
	"Global starting frame of the movie/sequence, assuming first picture has a #1",
	0, "*",
	PROP_INT, PROP_TIME | PROP_UNIT_TIME, NULL, 0, {0, 0, 0}, 0,
	rna_ImageUser_update, 0, NULL, NULL,
	offsetof(ImageUser, sfra), 0, NULL},
	ImageUser_frame_start_get, ImageUser_frame_start_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	-500000, 500000, -500000, 500000, 1, 0, NULL
};

IntPropertyRNA rna_ImageUser_fields_per_frame = {
	{(PropertyRNA *)&rna_ImageUser_multilayer_layer, (PropertyRNA *)&rna_ImageUser_frame_start,
	-1, "fields_per_frame", 1, 0, 4, "Fields per Frame",
	"Number of fields per rendered frame (2 fields is 1 image)",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_ImageUser_update, 0, NULL, NULL,
	offsetof(ImageUser, fie_ima), 2, NULL},
	ImageUser_fields_per_frame_get, ImageUser_fields_per_frame_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 200, 1, 200, 1, 0, NULL
};

IntPropertyRNA rna_ImageUser_multilayer_layer = {
	{(PropertyRNA *)&rna_ImageUser_multilayer_pass, (PropertyRNA *)&rna_ImageUser_fields_per_frame,
	-1, "multilayer_layer", 2, 0, 4, "Layer",
	"Layer in multilayer image",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	offsetof(ImageUser, layer), 1, NULL},
	ImageUser_multilayer_layer_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 32767, 0, 32767, 1, 0, NULL
};

IntPropertyRNA rna_ImageUser_multilayer_pass = {
	{(PropertyRNA *)&rna_ImageUser_multilayer_view, (PropertyRNA *)&rna_ImageUser_multilayer_layer,
	-1, "multilayer_pass", 2, 0, 4, "Pass",
	"Pass in multilayer image",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	offsetof(ImageUser, pass), 1, NULL},
	ImageUser_multilayer_pass_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 32767, 0, 32767, 1, 0, NULL
};

IntPropertyRNA rna_ImageUser_multilayer_view = {
	{NULL, (PropertyRNA *)&rna_ImageUser_multilayer_pass,
	-1, "multilayer_view", 2, 0, 4, "View",
	"View in multilayer image",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	offsetof(ImageUser, view), 1, NULL},
	ImageUser_multilayer_view_get, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 32767, 0, 32767, 1, 0, NULL
};

StructRNA RNA_ImageUser = {
	{(ContainerRNA *)&RNA_ImagePackedFile, (ContainerRNA *)&RNA_Image,
	NULL,
	{(PropertyRNA *)&rna_ImageUser_rna_properties, (PropertyRNA *)&rna_ImageUser_multilayer_view}},
	"ImageUser", NULL, NULL, 4, "Image User",
	"Parameters defining how an Image data-block is used by another data-block",
	"*", 17,
	NULL, (PropertyRNA *)&rna_ImageUser_rna_properties,
	NULL,
	NULL,
	NULL,
	rna_ImageUser_path,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* ImagePackedFile */
CollectionPropertyRNA rna_ImagePackedFile_rna_properties = {
	{(PropertyRNA *)&rna_ImagePackedFile_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	ImagePackedFile_rna_properties_begin, ImagePackedFile_rna_properties_next, ImagePackedFile_rna_properties_end, ImagePackedFile_rna_properties_get, NULL, NULL, ImagePackedFile_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_ImagePackedFile_rna_type = {
	{(PropertyRNA *)&rna_ImagePackedFile_packed_file, (PropertyRNA *)&rna_ImagePackedFile_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	ImagePackedFile_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

PointerPropertyRNA rna_ImagePackedFile_packed_file = {
	{(PropertyRNA *)&rna_ImagePackedFile_filepath, (PropertyRNA *)&rna_ImagePackedFile_rna_type,
	-1, "packed_file", 8388608, 0, 0, "Packed File",
	"",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	ImagePackedFile_packed_file_get, NULL, NULL, NULL,&RNA_PackedFile
};

StringPropertyRNA rna_ImagePackedFile_filepath = {
	{NULL, (PropertyRNA *)&rna_ImagePackedFile_packed_file,
	-1, "filepath", 262145, 0, 0, "filepath",
	"",
	0, "*",
	PROP_STRING, PROP_FILEPATH | PROP_UNIT_NONE, NULL, 0, {1024, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	ImagePackedFile_filepath_get, ImagePackedFile_filepath_length, ImagePackedFile_filepath_set, NULL, NULL, NULL, 1024, ""
};

FunctionRNA rna_ImagePackedFile_save_func = {
	{NULL, NULL,
	NULL,
	{NULL, NULL}},
	"save", 16, "Save the packed file to its filepath",
	ImagePackedFile_save_call,
	NULL
};

StructRNA RNA_ImagePackedFile = {
	{(ContainerRNA *)&RNA_Key, (ContainerRNA *)&RNA_ImageUser,
	NULL,
	{(PropertyRNA *)&rna_ImagePackedFile_rna_properties, (PropertyRNA *)&rna_ImagePackedFile_filepath}},
	"ImagePackedFile", NULL, NULL, 4, "ImagePackedFile",
	"",
	"*", 17,
	(PropertyRNA *)&rna_ImagePackedFile_filepath, (PropertyRNA *)&rna_ImagePackedFile_rna_properties,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{(FunctionRNA *)&rna_ImagePackedFile_save_func, (FunctionRNA *)&rna_ImagePackedFile_save_func}
};

