Skip to content
Snippets Groups Projects
Commit 047e10fc authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

PNG support initiated

Rev: src/modules/Image/Makefile:1.5
Rev: src/modules/Image/encodings/Makefile.in:1.7
Rev: src/modules/Image/encodings/png.c:1.1
parent cee41db1
Branches
Tags
No related merge requests found
......@@ -80,6 +80,7 @@ testfont binary
/src/modules/Image/encodings/gif.c foreign_ident
/src/modules/Image/encodings/gif_lzw.c foreign_ident
/src/modules/Image/encodings/gif_lzw.h foreign_ident
/src/modules/Image/encodings/png.c foreign_ident
/src/modules/Image/encodings/pnm.c foreign_ident
/src/modules/Image/font.c foreign_ident
/src/modules/Image/illustration.pike foreign_ident
......
......@@ -2,7 +2,7 @@
DOCFILES = doc-header \
blit.c blit_layer_include.h colortable.c colortable.h dct.c font.c \
image.c image.h matrix.c operator.c pattern.c pnm.c \
polyfill.c quant.c togif.c x.c encodings/gif.c encodings/gif_lzw.c \
polyfill.c togif.c x.c encodings/gif.c encodings/gif_lzw.c \
encodings/gif_lzw.h encodings/pnm.c \
doc-footer
......
SRCDIR=@srcdir@
VPATH=@srcdir@:@srcdir@/../../..:../../..
GIF_OBJS = gif.o gif_lzw.o
GIF_OBJS = gif.o gif_lzw.o png.o
JPEG_OBJS = jpeg.o
PNG_OBJS = png.o
PNM_OBJS = pnm.o
OBJS=gif.a pnm.a
......@@ -19,6 +21,14 @@ gif.a : $(GIF_OBJS)
rm -f gif.a
$(AR) cq gif.a $(GIF_OBJS)
png.a : $(PNG_OBJS)
rm -f png.a
$(AR) cq png.a $(PNG_OBJS)
jpeg.a : $(JPEG_OBJS)
rm -f jpeg.a
$(AR) cq jpeg.a $(JPEG_OBJS)
pnm.a : $(PNM_OBJS)
rm -f pnm.a
$(AR) cq pnm.a $(PNM_OBJS)
......
/* $Id: png.c,v 1.1 1997/11/12 03:37:52 mirar Exp $ */
/*
**! module Image
**! note
**! $Id: png.c,v 1.1 1997/11/12 03:37:52 mirar Exp $
**! submodule PNG
**!
**! This submodule keep the PNG encode/decode capabilities
**! of the <ref>Image</ref> module.
**!
**! PNG is a rather new lossless image storage format,
**! usable for most images.
**!
**! Simple encoding:
**! <ref>encode</ref>
**!
**! see also: Image, Image.image, Image.colortable
*/
#include <math.h>
#include <ctype.h>
#include "stralloc.h"
#include "global.h"
RCSID("$Id: png.c,v 1.1 1997/11/12 03:37:52 mirar Exp $");
#include "pike_macros.h"
#include "object.h"
#include "constants.h"
#include "interpret.h"
#include "svalue.h"
#include "threads.h"
#include "array.h"
#include "error.h"
#include "threads.h"
void image_png__module_value(INT32 args)
{
pop_n_elems(args);
push_text("_Image_dot_PNG");
SAFE_APPLY_MASTER("resolv",1);
if (sp[-1].type==T_INT)
error("Image.PNG: Can't load submodule\n");
}
void init_image_png(void)
{
start_new_program();
add_function("_module_value",image_png__module_value,
"function(:object)",0);
push_object(clone_object(end_program(),0));
add_constant(make_shared_string("PNG"),sp-1,0);
pop_stack();
}
void exit_image_png(void)
{
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment