Commit Graph

41 Commits

Author SHA1 Message Date
b457c7fdbd style cleanup 2012-03-12 23:56:11 +00:00
30fd1ab523 replace ImBuf.depth with ImBuf.planes to match ImageFormatData.planes & to avoid confusion with ImageFormatData.depth 2011-11-21 20:47:19 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
018fa1540e whitespace edits, make formatting for functions consustent at least within the file. 2011-09-28 05:53:40 +00:00
1915f1b1e2 quiet 2 compiler warnings and update man page 2011-06-04 03:07:56 +00:00
d0e4f7b9f2 remove unused code, comment some that may be useful (maintainers can remove). 2011-05-23 15:23:31 +00:00
c7fccc84bf use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors. 2011-03-05 10:29:10 +00:00
Nathan Letwory
192ab99b5c doxygen: blender/imbuf tagged. 2011-02-27 20:23:21 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
5a09368957 use 'const char *' for imbuf and file ops. 2010-11-19 02:14:18 +00:00
f791d74f10 writing single images from a render (own commit r33104), wasn't checking if the render was cancelled which would crash when writing the image.
also remove paranoid checks for writing TAGA, Other formats - BMP, JPEG, Iris don't do this.
2010-11-17 04:02:19 +00:00
30b79ddcc6 - fixed remaining unused warnings.
- omit render code from this warning (cmake only), until render branch is merged.
- moved -Wunused-parameter warning to apply to all C code in blender (not just ./source/blender), (cmake only).
2010-10-17 06:38:56 +00:00
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
9234f29e67 bugfix [#23405] PNG Images bigger then 2gig wont load with blender.
all image formats should be able to load files bigger then 2gig (when its supported)
2010-09-15 06:43:36 +00:00
d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
992a4e8e7a Fix a crash when failing to read .tga files in some cases. 2010-06-23 10:24:35 +00:00
008863daec Merge image related changes from the render branch. This includes the image
tile cache code in imbuf, but it is not hooked up to the render engine.


Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines).

* Added a ImFileType struct with callbacks to make adding an file format type,
  or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
  a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
  editing the code directly.
* Functions removed that were only used for sequencer plugin API:
  IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
  IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
  IMB_dit0, IMB_dit2, IMB_cspace
* Write metadata info into OpenEXR images. Can be viewed with the command
  line utility 'exrheader'

For the image tile cache code, see this page:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache
2010-05-07 15:18:04 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
04dec46c6a Color management fixes
Now it's a bit more robust, tagging images with profiles when they're loaded, 
which then get interpreted later on by conversion functions. Just Linear RGB 
and sRGB profiles at the moment, same as before.

This commit fixes Martin's problem with EXRs and Multilayer images loading/
saving too dark, and it also makes the sequence editor work correctly with it too.

Also fixes:
[#19647] gamma correction with color management is reset when resetting Curve
[#19454] 2.5: Dither does not work when Color management is enabled
2010-01-09 00:16:35 +00:00
d5592fe254 fixes for errors/warnings found with cppcheck 2009-12-26 20:23:13 +00:00
de36dd1e99 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22099:22130 2009-08-02 03:59:00 +00:00
e60138117c - Ancient resource leak (rev 2) where checkPackedFile would open a file and never close it.
- Running simulations missed freeing some variables.
2009-08-01 06:27:40 +00:00
396ebf0c91 better loading partially written TARGA's, dont read over the end of the buffer and set the remaining pixels 0. 2009-07-27 22:41:35 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Chris Want
5e3cffc64a Patch to change license to GPL only, from GSR. 2008-01-07 19:13:47 +00:00
a4b6dc81e4 missed one more endian issue. Lynx3d saw it...
Kent
2006-11-07 21:24:47 +00:00
a221ddcf9b removed redefinition of cp and mem.
Was causing problems on windows.  (Its odd that it worked on gcc without
warnings)

Thanks to damiles.

Kent
2006-11-07 18:32:25 +00:00
387f3b6a07 Patch provided by (lynx3d) Mathias Wein,
It fixes endian issues with 16bit targa images.
this is fixing bug #4982

Kent
2006-11-07 17:32:29 +00:00
014aa7261e Orange branch: OpenEXR finally in Blender!
Credits go to Gernot Ziegler, who originally coded EXR support, and to
Austin  Benesh for bringing it further. Kent Mein provided a lot of code
for integrating float buffers in Blender imbuf and ImBuf API cleanup,
and provided Make and Scons and static linking.

At this moment; the EXR libraries are a *dependency*, so you cannot get
the Orange branch compiled without having OpenEXR installed. Get the
(precompiled or sources) stuff from www.openexr.com. Current default is
that the headers and lib resides in /user/local/

Several changes/additions/fixes were added:

- EXR code only supported 'half' format (16 bits per channel). I've added
  float writing, but for reading it I need tomorrow. :)
- Quite some clumsy copying of data happened in EXR code.
- cleaned up the api calls already a bit, preparing for more advanced
  support
- Zbuffers were saved 16 bits, now 32 bits
- automatic adding of .exr extensions went wrong

Imbuf:

- added proper imbuf->flags and imbuf->mall support for float buffers, it
  was created for *each* imbuf. :)
- found bugs for float buffers in scaling and flipping. Code there will
  need more checks still
- imbuf also needs to be verified to behave properly when no 32 bits
  rect exists (for saving for example)

TODO:

- support internal float images for textures, backbuf, AO probes, and
  display in Image window

Hope this commit won't screwup syncing with bf-blender... :/
2006-01-09 00:40:35 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
3c592ec3ad This is for bug # 2068
I standarized the returns on a failed opening of the output file for
the above image formats.

I also cleaned up a couple of warnings.

Kent
2005-01-10 16:22:40 +00:00
3bbc65a5f4 This is a pretty lame commit but here it is:
I just fixed indentation (replaced spaces with tabs where needed) and removed
#include config.h stuff from the above files.

Kent
2005-01-03 19:53:04 +00:00
8cf7f44047 Eeek! last minute error.
Commit of dec 9... still uses fopen(name, "ab") instead of "wb"
Caused targa and bmp files to write wrong on save-over, appended instead.
2004-12-21 18:49:31 +00:00
bdffe196af This fixes bug #1990
It moves targa, bmp, iris and png loading so that were not opening
2 file handles for each file, and made them like the jpeg stuff.

Also cleaned up some minor other stuff.

Kent
2004-12-09 13:09:11 +00:00
d4fc04f76a - increased max targa size to 8192x8192
was done before by Phase in tuho1, and no error found...
2004-01-22 12:59:46 +00:00
af45ac2703 translated comments for imbuf c files 2003-04-27 09:59:36 +00:00
9bb91f9e57 Fix so that rgba targa files view correctly in gimp:
Submitted to bf-committers by Chris Want

Kent

Index: targa.c
===================================================================
RCS file: /cvs01/blender/source/blender/imbuf/intern/targa.c,v
retrieving revision 1.4
diff -u -r1.4 targa.c
--- targa.c     2002/12/20 01:29:14     1.4
+++ targa.c     2002/12/21 09:50:24
@@ -289,6 +289,12 @@

        if (flags & IB_ttob) buf[17] ^= 0x20;

+        /* Don't forget to indicate that your 32 bit
+         * targa uses 8 bits for the alpha channel! */
+        if (ibuf->depth==32) {
+           buf[17] |= 0x08;
+        }
+
        if (write(file, buf, 18) != 18) return (0);
        if (ibuf->cmap){
                for (i = 0 ; i<ibuf->maxcol ; i++){
2002-12-21 09:52:03 +00:00
cf13c60fa4 Two more variables that were not initalized.
cvs diff included below.

Kent
--
mein@cs.umn.edu

Index: png_encode.c
===================================================================
RCS file: /cvs01/blender/source/blender/imbuf/intern/png_encode.c,v
retrieving revision 1.3
diff -u -r1.3 png_encode.c
--- png_encode.c        2002/11/25 12:02:00     1.3
+++ png_encode.c        2002/12/20 01:28:18
@@ -91,7 +91,7 @@
        unsigned char *pixels = 0;
        unsigned char *from, *to;
        png_bytepp row_pointers = 0;
-       int i, bytesperpixel, color_type;
+       int i, bytesperpixel, color_type = PNG_COLOR_TYPE_GRAY;
        FILE *fp = 0;

Index: targa.c
===================================================================
RCS file: /cvs01/blender/source/blender/imbuf/intern/targa.c,v
retrieving revision 1.3
diff -u -r1.3 targa.c
--- targa.c     2002/11/25 12:02:00     1.3
+++ targa.c     2002/12/20 01:28:20
@@ -247,7 +247,7 @@
        char buf[20];
        FILE *fildes;
        int i;
-       short ok;
+       short ok = 0;
2002-12-20 01:29:14 +00:00
d0e346d544 updated .c files to include:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

Just need to finish cpp files now :)

Kent
--
mein@cs.umn.edu
2002-11-25 12:02:15 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00