Skip to content

Commit 556a94c

Browse files
committed
works for RGBA, RGB and palette PNGs
1 parent cf59d07 commit 556a94c

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project(VividImage)
33

44
set(CMAKE_CXX_STANDARD 11)
55

6-
set(BUILD_LIBRARY true)
6+
set(BUILD_LIBRARY false)
77

88
set(MAIN_FILE main.cpp)
99
set(HEADER_FILES image.h bitarray.h node.h tree.h)

bin/debug/VividImage.exe

0 Bytes
Binary file not shown.
1.75 MB
Binary file not shown.

image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ namespace vivid { namespace util {
278278
}
279279
}
280280

281-
// todo: add pixel creation for types 0, 2 and 4
281+
// todo: add pixel creation for types 3, 2 and 4
282282
if (format.colorFormat == 3) {
283283
PixelRGB* pixels = new PixelRGB[format.width * format.height];
284284

main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ int main() {
1515
LOG("Interlace method: " << image.getFormat().interlaceMethod);
1616
//const PixelRGBA* pixels = (PixelRGBA*) image.getData();
1717

18-
unsigned int x = 29;
19-
unsigned int y = 9;
18+
unsigned int x = 0;
19+
unsigned int y = 120;
2020
PixelRGBA pixel = image.getPixel(x, y);
2121
std::printf("%08X\n", pixel.color());
2222

0 commit comments

Comments
 (0)