aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-08-28 01:50:09 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-08-28 01:50:09 -0700
commit3f31b9852c313b6b9a670e9c202a7fb339e5d448 (patch)
tree44421a18e2e2c636683aa20940700e3e3425b3b8 /com32/lib/sys/vesa
parent185b1c3a6c1f3ba8566507f1d8fe555480495a9c (diff)
downloadsyslinux-3f31b9852c313b6b9a670e9c202a7fb339e5d448.tar.gz
syslinux-3f31b9852c313b6b9a670e9c202a7fb339e5d448.tar.xz
syslinux-3f31b9852c313b6b9a670e9c202a7fb339e5d448.zip
Work on getting libpng to actually do something useful...
Diffstat (limited to 'com32/lib/sys/vesa')
-rw-r--r--com32/lib/sys/vesa/background.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/com32/lib/sys/vesa/background.c b/com32/lib/sys/vesa/background.c
index 7de2d5a4..5a34ef82 100644
--- a/com32/lib/sys/vesa/background.c
+++ b/com32/lib/sys/vesa/background.c
@@ -55,8 +55,6 @@ int vesacon_load_background(const char *filename)
png_infop end_ptr = NULL;
png_color_16p image_background;
static const png_color_16 my_background = {0,0,0,0,0};
- double gamma;
- const double screen_gamma = 2.2;
png_bytep row_pointers[VIDEO_Y_SIZE];
int passes;
int i;
@@ -123,6 +121,11 @@ int vesacon_load_background(const char *filename)
png_set_bgr(png_ptr);
+ if (info_ptr->bit_depth == 16)
+ png_set_strip_16(png_ptr);
+ else if (info_ptr->bit_depth < 8)
+ png_set_packing(png_ptr);
+
if (png_get_bKGD(png_ptr, info_ptr, &image_background))
png_set_background(png_ptr, image_background,
PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
@@ -130,17 +133,6 @@ int vesacon_load_background(const char *filename)
png_set_background(png_ptr, &my_background,
PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
-
- if (info_ptr->bit_depth == 16)
- png_set_strip_16(png_ptr);
- else if (info_ptr->bit_depth < 8)
- png_set_packing(png_ptr);
-
- if (png_get_gAMA(png_ptr, info_ptr, &gamma))
- png_set_gamma(png_ptr, screen_gamma, gamma);
- else
- png_set_gamma(png_ptr, screen_gamma, 0.45455);
-
/* Whew! Now we should get the stuff we want... */
for (i = 0; i < info_ptr->height; i++)
row_pointers[i] = (png_bytep *)__vesacon_background[i];