blender/source/blender/imbuf
Peter Schlaile d47e1fee32 == FFMPEG ==
This fixes the underlying problem of the DV crashings - within blender
code. 

Problem was, that we tried to seek on decode errors. (Unintentionally,
curposition wasn't advanced in that case). That triggered a bug within
ffmpeg, that made blender crash. My workaround fix for 2.49 actually only
prevented the crash, but didn't stop ffmpeg from only decoding black frames
after that point...

(The patch also cleans up the color conversion a little bit, by using
PIX_FMT_RGBA (still need to find a way to make it work with video files
that actually *have* an alpha channel. At least, latest FFMPEG-SVN swscaler
has the ability to use alpha.)

Looks like we can remove extern/ffmpeg now...
2009-09-13 17:52:36 +00:00
..
intern == FFMPEG == 2009-09-13 17:52:36 +00:00
CMakeLists.txt white space commit. (2 spaces -> tab). 2009-09-06 01:51:23 +00:00
IMB_imbuf_types.h Colour Management 2009-07-17 02:43:15 +00:00
IMB_imbuf.h 2.5: Texture Filtering 2009-07-21 13:20:35 +00:00
IMB_thumbs.h 2.5 filebrowser 2009-03-03 10:24:06 +00:00
Makefile Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
readme.txt This commit does very little for the number of files touched. 2005-12-02 21:13:14 +00:00
SConscript == SCons == 2009-09-05 01:58:02 +00:00

The following 4 steps to adding a new image format to blender, its
probably easiest to look at the png code for a clean clear example,
animation formats are a bit more complicated but very similar:

Step 1:
create a new file named after the format for example lets say we were
creating an openexr read/writer  use openexr.c
It should contain functions to match the following prototypes:

struct ImBuf *imb_loadopenexr(unsigned char *mem,int size,int flags);
/* Use one of the following depending on whats easyer for your file format */
short imb_saveopenexr(struct ImBuf *ibuf, FILE myfile, int flags);
short imb_saveopenexr(struct ImBuf *ibuf, char *myfile, int flags);

/* Used to test if its the correct format
int IMB_is_openexr(void *buf);

Step 2: 
Add your hooks to read and write the image format these go in
	writeimage.c and readimage.c  just look at how the others are done

Step 3: 
Add in IS_openexr to blender/source/blender/imbuf/IMB_imbuf_types.h
Add in R_openexr to source/blender/makesdna/DNA_scene_types.h

Step 4:
Add your hooks to the gui.
source/blender/src/buttons_scene.c
source/blender/src/toets.c
source/blender/src/writeimage.c

Step 5:
edit the following files:
blender/source/blender/imbuf/intern/util.c
blender/source/blender/src/filesel.c
blender/source/blender/src/screendump.c
and add your extension so that your format gets recognized in the thumbnails.

Step 6: 
Alter the build process:
For scons you need to edit blender/source/blender/imbuf/SConscript 
and add in your additional files to source_files.
For msvp you need to edit blender/projectfiles/blender/imbuf/BL_imbuf.dsp
and add in your additional files.
If you have any external library info you will also need to add that 
to the various build processes.

Step 7:
Its also good to add your image format to:
makepicstring in blender/source/blender/blenkernel/intern/image.c