Changeset 256 for trunk/lodepng/lodepng
- Timestamp:
- 03/11/08 08:46:01 (9 months ago)
- Files:
-
- trunk/lodepng (modified) (1 prop)
- trunk/lodepng/lodepng/Common.d (modified) (2 diffs)
- trunk/lodepng/lodepng/Decode.d (modified) (3 diffs)
- trunk/lodepng/lodepng/ZlibCodec.d (modified) (1 diff)
- trunk/lodepng/lodepng/examples (modified) (1 prop)
- trunk/lodepng/lodepng/examples/dsss.conf (modified) (1 diff)
- trunk/lodepng/lodepng/examples/png2bin.d (added)
- trunk/lodepng/lodepng/examples/recoder.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lodepng
- Property svn:ignore changed from
dsss_imports
dsss_objs
pngsuite
Encode_bak.d
Recode
to
dsss_imports
dsss_objs
pngsuite
Encode_bak.d
Recode
.classpath
.project
dsss.last
libDD-lodepng.a
lodepng.tar.gz
- Property svn:ignore changed from
trunk/lodepng/lodepng/Common.d
r218 r256 308 308 { 309 309 return [ 0 : 1, 2 : 3, 3 : 1, 4 : 2, 6 : 4, 7 : 0] [colorType]; 310 } 311 312 uint bytesPerPixel(ref PngImage image) 313 { 314 return image.bitDepth / 8; 310 315 } 311 316 … … 794 799 return result; 795 800 } 801 802 public char[] colorTypeToString(ColorType ct) 803 { 804 switch (ct) 805 { 806 with (ColorType) 807 { 808 case Greyscale: return "Greyscale"; 809 case RGB: return "RGB"; 810 case Palette: return "Palette"; 811 case GreyscaleAlpha: return "GreyscaleAlpha"; 812 case RGBA: return "RGBA"; 813 } 814 default: return null; 815 } 816 } trunk/lodepng/lodepng/Decode.d
r217 r256 101 101 import lodepng.util; 102 102 import std.intrinsic; 103 version(GNU) 104 { 105 // handled in dsss.conf 106 } 107 else 108 { 109 pragma(lib, "zlib"); 110 } 103 111 104 112 105 version (Tango) … … 155 148 assert(decompressor.ended); 156 149 157 return decompressor.reconstructImage() ;150 return decompressor.reconstructImage()[0..info.image.width * bytesPerPixel(info.image) * info.image.height]; 158 151 } 159 152 … … 178 171 info.image.bitDepth = 8; 179 172 info.palette.length = 0; 180 return buffer ;173 return buffer[0..info.image.width * bytesPerPixel(info.image) * info.image.height]; 181 174 } 182 175 trunk/lodepng/lodepng/ZlibCodec.d
r217 r256 2 2 module lodepng.ZlibCodec; 3 3 4 version( GNU)4 version(Windows) 5 5 { 6 // handled in dsss.conf 7 } 8 else 9 { 10 pragma(lib, "zlib"); 6 pragma(lib, "zlib"); 11 7 } 12 8 trunk/lodepng/lodepng/examples
- Property svn:ignore set to
Test2.d
Test2.png
VtesSearch.d
VtesSearch.png
dsss.last
png2bin
recoder
test
test.d
- Property svn:ignore set to
trunk/lodepng/lodepng/examples/dsss.conf
r217 r256 1 1 [recoder.d] 2 2 requires=lodepng 3 buildflags=-llz 3 buildflags=-O -inline 4 version (Posix) { 5 buildflags += -llz 6 } 4 7 5 [ testpng.d]8 [png2bin.d] 6 9 requires=lodepng 7 buildflags=-llz 10 buildflags=-O -inline 11 version (Posix) { 12 buildflags += -llz 13 } trunk/lodepng/lodepng/examples/recoder.d
r201 r256 3 3 */ 4 4 module recoder; 5 6 version(Windows) 7 { 8 pragma(lib, "zlib"); 9 } 5 10 6 11 import lodepng.Decode,
