[svn-r15464] delete h52jpeg

This commit is contained in:
Pedro Vicente Nunes 2008-08-12 09:29:07 -05:00
parent 507a211257
commit 57479bc963
9 changed files with 0 additions and 223812 deletions

View File

@ -1,46 +0,0 @@
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
#
# HDF5 Library Makefile(.in)
#
include $(top_srcdir)/config/commence.am
# Include src and tools/lib directories
INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
# These are our main targets
TEST_PROG=h52jpegtst
TEST_SCRIPT=$(srcdir)/h52jpeg.sh
check_SCRIPTS=$(TEST_SCRIPT)
check_PROGRAMS=$(TEST_PROG)
bin_PROGRAMS=h52jpeg
noinst_PROGRAMS=h52jpegtst
h52jpeg_SOURCES=h52jpeg.c
h52jpegtst_SOURCES=h52jpegtst.c
# Programs all depend on the hdf5 library, the tools library, and the HL
# library.
LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5) -ljpeg
CHECK_CLEANFILES+=*.h5
CHECK_CLEANFILES+=*.jpeg
include $(top_srcdir)/config/conclude.am

View File

@ -1,882 +0,0 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
#
# HDF5 Library Makefile(.in)
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am
check_PROGRAMS = $(am__EXEEXT_1)
bin_PROGRAMS = h52jpeg$(EXEEXT)
noinst_PROGRAMS = h52jpegtst$(EXEEXT)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
subdir = hl/tools/h52jpeg
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/H5config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
am__EXEEXT_1 = h52jpegtst$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am_h52jpeg_OBJECTS = h52jpeg.$(OBJEXT)
h52jpeg_OBJECTS = $(am_h52jpeg_OBJECTS)
h52jpeg_LDADD = $(LDADD)
h52jpeg_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
am_h52jpegtst_OBJECTS = h52jpegtst.$(OBJEXT)
h52jpegtst_OBJECTS = $(am_h52jpegtst_OBJECTS)
h52jpegtst_LDADD = $(LDADD)
h52jpegtst_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(h52jpeg_SOURCES) $(h52jpegtst_SOURCES)
DIST_SOURCES = $(h52jpeg_SOURCES) $(h52jpegtst_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
# Set the paths for AFS installs of autotools for Linux machines
# Ideally, these tools should never be needed during the build.
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
AWK = @AWK@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
# but which shouldn't be exported to h5cc for building other programs.
CFLAGS = @CFLAGS@ @H5_CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
DIRECT_VFD = @DIRECT_VFD@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
# Make sure that these variables are exported to the Makefiles
F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GPFS = @GPFS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_LONE_COLON = @H5_LONE_COLON@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
HID_T = @HID_T@
HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LINUX_LFS = @LINUX_LFS@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
RUNSERIAL = @RUNSERIAL@
R_INTEGER = @R_INTEGER@
R_LARGE = @R_LARGE@
SEARCH = @SEARCH@
SED = @SED@
SETX = @SETX@
SET_MAKE = @SET_MAKE@
# Hardcode SHELL to be /bin/sh. Most machines have this shell, and
# on at least one machine configure fails to detect its existence (janus).
# Also, when HDF5 is configured on one machine but run on another,
# configure's automatic SHELL detection may not work on the build machine.
SHELL = /bin/sh
SIZE_T = @SIZE_T@
STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
USE_FILTER_NBIT = @USE_FILTER_NBIT@
USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_FC = @ac_ct_FC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
# Install directories that automake doesn't know about
includedir = $(exec_prefix)/include
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Shell commands used in Makefiles
RM = rm -f
CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
# We use RUNTESTS instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
RUNTESTS = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
LIBH5TEST = $(top_builddir)/test/libh5test.la
LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la
LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la
LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la
LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la
LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
H5CC = $(bindir)/h5cc
H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
H5CPP = $(bindir)/h5c++
# The trace script; this is used on source files from the C library to
# insert tracing macros.
TRACE = perl $(top_srcdir)/bin/trace
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
# *.clog are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.jpeg
# Include src and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
# These are our main targets
TEST_PROG = h52jpegtst
TEST_SCRIPT = $(srcdir)/h52jpeg.sh
check_SCRIPTS = $(TEST_SCRIPT)
h52jpeg_SOURCES = h52jpeg.c
h52jpegtst_SOURCES = h52jpegtst.c
# Programs all depend on the hdf5 library, the tools library, and the HL
# library.
LDADD = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5) -ljpeg
# Automake needs to be taught how to build lib, progs, and tests targets.
# These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to
# be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hl/tools/h52jpeg/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign hl/tools/h52jpeg/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
h52jpeg$(EXEEXT): $(h52jpeg_OBJECTS) $(h52jpeg_DEPENDENCIES)
@rm -f h52jpeg$(EXEEXT)
$(LINK) $(h52jpeg_OBJECTS) $(h52jpeg_LDADD) $(LIBS)
h52jpegtst$(EXEEXT): $(h52jpegtst_OBJECTS) $(h52jpegtst_DEPENDENCIES)
@rm -f h52jpegtst$(EXEEXT)
$(LINK) $(h52jpegtst_OBJECTS) $(h52jpegtst_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h52jpeg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h52jpegtst.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(PROGRAMS) all-local
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
clean-libtool clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool mostlyclean-local
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
clean clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-binPROGRAMS install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
# This tells the Makefiles that these targets are not files to be built but
# commands that should be executed even if a file with the same name already
# exists.
.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
build-tests check-clean check-install check-p check-s check-vfd \
install-doc lib progs tests uninstall-doc _exec_check-s _test help
help:
@$(top_srcdir)/bin/makehelp
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(TESTS)
# General rule for recursive building targets.
# BUILT_SOURCES contain targets that need to be built before anything else
# in the directory (e.g., for Fortran type detection)
lib progs tests check-s check-p :: $(BUILT_SOURCES)
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# General rule for recursive cleaning targets. Like the rule above,
# but doesn't require building BUILT_SOURCES.
check-clean ::
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Tell Automake to build tests when the user types `make all' (this is
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
# Automake won't build them automatically, either.
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
# make install-doc doesn't do anything outside of doc directory, but
# Makefiles should recognize it.
# UPDATE: docs no longer reside in this build tree, so this target
# is depreciated.
install-doc uninstall-doc:
@echo "Nothing to be done."
# clean up files generated by tests so they can be re-run.
build-check-clean:
$(RM) -rf $(CHECK_CLEANFILES)
# run check-clean whenever mostlyclean is run
mostlyclean-local: build-check-clean
# check-install is just a synonym for installcheck
check-install: installcheck
# Run each test in order, passing $(TEST_FLAGS) to the program.
# Since tests are done in a shell loop, "make -i" does apply inside it.
# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
# The timestamps give a rough idea how much time the tests use.
#
# Note that targets in TESTS (defined above) will be built when the user
# types 'make tests' or 'make check', but only programs in TEST_PROG,
# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
check-TESTS: test
test _test:
@$(MAKE) build-check-s
@$(MAKE) build-check-p
# Actual execution of check-s.
build-check-s: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
fi
@$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
# The dummy.chkexe here prevents the target from being
# empty if there are no tests in the current directory.
# $${log} is the log file.
# $${tname} is the name of test.
$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
@if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
tname=$(@:.chkexe_=)$(EXEEXT);\
log=$(@:.chkexe_=.chklog); \
echo "============================"; \
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
echo "No need to test $${tname} again."; \
else \
echo "============================" > $${log}; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
elif test "X$(CXX_API)" = "Xyes"; then \
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
else \
echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
$(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
echo "" >> $${log}; \
echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
echo "============================" >> $${log}; \
echo "Finished testing $${tname} $(TEST_FLAGS)"; \
cat $${log}; \
fi; \
fi
# The dummysh.chkexe here prevents the target from being
# empty if there are no tests in the current directory.
# $${log} is the log file.
# $${tname} is the name of test.
$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
@if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \
cmd=$(@:.chkexe_=);\
tname=`basename $$cmd`;\
chkname=`basename $(@:.chkexe_=.chkexe)`;\
log=`basename $(@:.chkexe_=.chklog)`; \
echo "============================"; \
if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \
echo "No need to test $${tname} again."; \
else \
echo "============================" > $${log}; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
elif test "X$(CXX_API)" = "Xyes"; then \
echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
else \
echo "Testing $${tname} $(TEST_FLAGS)"; \
echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
fi; \
echo "============================" >> $${log}; \
RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
srcdir="$(srcdir)" \
$(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $${chkname} || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
echo "" >> $${log}; \
echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
echo "============================" >> $${log}; \
echo "Finished testing $${tname} $(TEST_FLAGS)"; \
cat $${log}; \
fi; \
echo "============================"; \
fi
# Actual execution of check-p.
build-check-p: $(LIB) $(PROGS) $(TESTS)
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
fi
@if test -n "$(TEST_PROG_PARA)"; then \
echo "**** Hint ****"; \
echo "Parallel test files reside in the current directory" \
"by default."; \
echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
echo " HDF5_PARAPREFIX=/PFS/user/me"; \
echo " export HDF5_PARAPREFIX"; \
echo " make check"; \
echo "**** end of Hint ****"; \
fi
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
RUNTESTS="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \
fi; \
done
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
fi
# Run test with different Virtual File Driver
check-vfd: $(LIB) $(PROGS) $(TESTS)
@for vfd in $(VFD_LIST) dummy; do \
if test $$vfd != dummy; then \
echo "============================"; \
echo "Testing Virtual File Driver $$vfd"; \
echo "============================"; \
$(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
fi; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,753 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdio.h>
#include <stdlib.h>
/*
* Include file for users of JPEG library.
* system headers that define at least the typedefs FILE and size_t are needed before
*/
#include "jpeglib.h"
#include "jerror.h"
/* Tools library and HDF5 Image headers */
#include "H5private.h"
#include "h5tools.h"
#include "h5tools_utils.h"
#include "h5trav.h"
#include "H5IMpublic.h"
const char *progname = "h52jpeg";
int d_status = EXIT_SUCCESS;
/* command-line options: The user can specify short or long-named parameters */
static const char *s_opts = "hVvi:cp:";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "version", no_arg, 'V' },
{ "verbose", no_arg, 'v' },
{ "image", require_arg, 'i' },
{ "convert", no_arg, 'c' },
{ "palette", require_arg, 'p' },
{ NULL, 0, '\0' }
};
/* a structure that contains h52jpeg options */
typedef struct
{
const char *file_name;
const char *template_name;
const char *image_name;
int convert_true;
int idx_palette;
int verbose;
} h52jpeg_opt_t;
/* prototypes */
static void usage(const char *prog);
static int h52jpeg(h52jpeg_opt_t opt);
static void make_jpeg_name( const char* template_name, const char* image_name, char* jpeg_name);
static int do_object(hid_t fid, h52jpeg_opt_t opt, const char* image_name);
static int do_image(hid_t fid, h52jpeg_opt_t opt, const char* image_name, char* jpeg_name);
static void write_JPEG_file(char *filename, JSAMPLE *image_buffer, int image_height, int image_width, int planes);
static void convert_to_true( hsize_t width, hsize_t height, unsigned char* ibuf, unsigned char* pbuf, unsigned char* tbuf);
/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: h52jpeg main program
*
* main reads command line options and calls h52jpeg
*
* Programmer: Pedro Vicente, pvn@hdfgroup.org
*
* Return: 1, error, 0 success
*
* Date: May 30, 2008
*
*-------------------------------------------------------------------------
*/
int main(int argc, const char *argv[])
{
h52jpeg_opt_t opt; /* command line options for h52jpeg */
int op; /* option got from command line */
/* initialze options to 0 */
memset(&opt,0,sizeof(h52jpeg_opt_t));
/* parse command line options */
while ((op = get_option(argc, argv, s_opts, l_opts)) != EOF)
{
switch ((char)op)
{
case 'h':
usage(progname);
exit(EXIT_SUCCESS);
case 'V':
print_version(progname);
exit(EXIT_SUCCESS);
case 'v':
opt.verbose = 1;
break;
case 'i':
opt.image_name = opt_arg;
break;
case 'c':
opt.convert_true = 1;
break;
case 'p':
opt.idx_palette = atoi(opt_arg);
break;
} /* switch */
} /* while */
/* check for file names to be processed */
if ( argv[ opt_ind ] != NULL && argv[ opt_ind + 1 ] != NULL )
{
opt.file_name = argv[ opt_ind ];
opt.template_name = argv[ opt_ind + 1 ];
}
else
{
usage(progname);
exit(EXIT_FAILURE);
}
if ( h52jpeg(opt) < 0 )
return 1;
return 0;
}
/*-------------------------------------------------------------------------
* Function: usage
*
* Purpose: print usage
*
* Return: void
*
*-------------------------------------------------------------------------
*/
static void usage(const char *prog)
{
printf("usage: %s [OPTIONS] file template\n", prog);
printf(" file HDF5 file name\n");
printf(" template Name template for jpeg images\n");
printf(" OPTIONS\n");
printf(" -h, --help Print a usage message and exit\n");
printf(" -v, --verbose Verbose mode, print object information\n");
printf(" -V, --version Print HDF5 version number and exit\n");
printf(" -i, --image Image name (full path in HDF5 file)\n");
printf(" -c, --convert Convert image from graycolor to truecolor\n");
printf(" -p P, --palette=P Use HDF5 palette index P in conversion -c\n");
printf("\n");
printf(" P - is an integer, the palette index in the HDF5 image. Default is 0\n");
printf(" template - is a string used to name the jpeg file name; this name is made\n");
printf(" by concatenating this template with the HDF5 image name\n");
printf("\n");
printf("Examples of use:\n");
printf("\n");
printf("1) h52jpeg -v file.h5 myjpeg\n");
printf("\n");
printf(" Exports all images found on file.h5 to jpeg images, giving output information\n");
printf("\n");
printf("2) h52jpeg -v -i image file.h5 myjpeg\n");
printf("\n");
printf(" Exports the HDF5 image named <image> to a jpeg file\n");
printf("\n");
printf("2) h52jpeg -v -c p 1 -i image file.h5 myjpeg\n");
printf("\n");
printf(" Exports the HDF5 image named <image> to a true color jpeg image, using\n");
printf(" the palette of index 1 in that image to do the conversion\n");
}
/*-------------------------------------------------------------------------
* Function: h52jpeg
*
* Parameters: OPT, options at command line
*
* Purpose: traverse the HDF5 file, save HDF5 images to jpeg files
*
* Return: 0, success, -1 error
*
*-------------------------------------------------------------------------
*/
static int h52jpeg(h52jpeg_opt_t opt)
{
hid_t fid;
trav_table_t *travt = NULL;
size_t i;
/* open the HDF5 file */
if (( fid = h5tools_fopen(opt.file_name, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0)
{
error_msg(progname, "cannot open file <%s>\n", opt.file_name );
return -1;
}
/*-------------------------------------------------------------------------
* object name was specified at command line
*-------------------------------------------------------------------------
*/
if ( opt.image_name )
{
/* read object, save jpeg image */
do_object(fid, opt, opt.image_name);
}
/*-------------------------------------------------------------------------
* object name was not specified; traverse the file
*-------------------------------------------------------------------------
*/
else
{
/* initialize traversal table */
trav_table_init(&travt);
/* get the list of objects in the file */
if ( h5trav_gettable(fid, travt) < 0 )
goto out;
/* search for images/datasets in file */
for ( i = 0; i < travt->nobjs; i++)
{
switch ( travt->objs[i].type )
{
default:
printf( "unknown object. Exiting ...\n" );
goto out;
case H5TRAV_TYPE_GROUP:
case H5TRAV_TYPE_NAMED_DATATYPE:
case H5TRAV_TYPE_LINK:
case H5TRAV_TYPE_UDLINK:
break;
case H5TRAV_TYPE_DATASET:
/* read object, save jpeg image */
do_object(fid, opt, travt->objs[i].name);
break; /* H5TRAV_TYPE_DATASET */
} /* switch */
} /* i */
/* HDfree table */
trav_table_free(travt);
} /* opt.image_name */
/* close */
if ( H5Fclose(fid) < 0 )
return -1;
return 0;
out:
H5E_BEGIN_TRY
{
H5Fclose(fid);
} H5E_END_TRY;
trav_table_free(travt);
return -1;
}
/*-------------------------------------------------------------------------
* Function: do_object
*
* Parameters: FID: HDF5 file id
* OPT: command line options
* OBJECT_NAME: the name of the object (type H5TRAV_TYPE_DATASET)
*
* Purpose: make the jpeg file name, read HDF5 image, save the jpeg image
*
*
* Return: 0, success, -1 error
*
*-------------------------------------------------------------------------
*/
static
int do_object(hid_t fid, h52jpeg_opt_t opt, const char* object_name)
{
int done=0; /* return value from do_image */
char jpeg_name[1024];
/* build the jpeg file name */
make_jpeg_name( opt.template_name, object_name, jpeg_name);
if ( opt.verbose)
{
printf("%s ...", object_name );
}
/*-------------------------------------------------------------------------
* HDF5 Image
*-------------------------------------------------------------------------
*/
if ( H5IMis_image( fid, object_name ) )
{
/* read image, save jpeg image */
done = do_image(fid, opt, object_name, jpeg_name);
}
if ( opt.verbose)
{
if ( done )
{
printf("saved to %s\n", jpeg_name );
}
else
{
printf("\n");
}
}
return 0;
}
/*-------------------------------------------------------------------------
* Function: do_image
*
* Parameters: FID: HDF5 file id
* OPT: command line options
* OBJECT_NAME: the name of the HDF5 image
* JPEG_NAME: the name of the jpeg image
*
* Purpose: read HDF5 image, save jpeg image
*
* Return: 0, success, -1 error
*
*-------------------------------------------------------------------------
*/
static
int do_image(hid_t fid, h52jpeg_opt_t opt, const char* image_name, char* jpeg_name)
{
hsize_t width;
hsize_t height;
hsize_t planes;
char interlace[20];
hssize_t npals;
const char* name;
int done;
unsigned char* ibuf=NULL;
name = image_name;
done = 0;
if ( H5IMget_image_info( fid, name, &width, &height, &planes, interlace, &npals ) < 0 )
goto out;
if (NULL == (ibuf = HDmalloc( (int)width * (int)height * (int)planes )))
goto out;
if ( H5IMread_image( fid, name, ibuf ) < 0 )
{
goto out;
}
/*-------------------------------------------------------------------------
* no conversion to true color requested or true color image, just save what we found
* this will result either in
*
* 24bit HDF5 ---> true color jpeg
* 8bit HDF5 ---> grey color jpeg
*
*-------------------------------------------------------------------------
*/
if ( planes == 3 || !opt.convert_true )
{
/* write the jpeg file */
write_JPEG_file (jpeg_name,
ibuf,
(int) height,
(int) width,
(int) planes);
done = 1;
}
/*-------------------------------------------------------------------------
* conversion to truecolor
* this will result in
*
* 8bit HDF5 ---> true color jpeg
*
*-------------------------------------------------------------------------
*/
else if (opt.convert_true && planes == 1 )
{
hsize_t pdims[2]; /* palette dimensions */
unsigned char *pbuf=NULL;/* palette array */
unsigned char *tbuf=NULL;/* true color array */
int ipal; /* palette to use */
if ( H5IMget_npalettes( fid, name, &npals ) < 0 )
{
goto out;
}
/*-------------------------------------------------------------------------
* there are palettes
*-------------------------------------------------------------------------
*/
if ( npals > 0 )
{
/* use either the default (0) palette or a requested one */
ipal = ( opt.idx_palette > 0 ) ? opt.idx_palette : 0;
/* the requested palette may not exist . use the default */
if ( opt.idx_palette >= npals )
{
ipal = 0;
if ( opt.verbose )
{
printf("palette index <%d> does not exist. Using default...",
opt.idx_palette );
}
}
if ( H5IMget_palette_info( fid, name, ipal, pdims ) < 0 )
goto out;
if (NULL == (pbuf = HDmalloc( (size_t)pdims[0] * (size_t)pdims[1] )))
goto out;
if (NULL == (tbuf = HDmalloc( (int)width * (int)height * 3 )))
goto out;
if ( H5IMget_palette( fid, name, ipal, pbuf ) < 0 )
goto out;
/* convert indexed image to true color image */
convert_to_true(width, height, ibuf, pbuf, tbuf);
/* write the jpeg file */
write_JPEG_file (jpeg_name,
tbuf,
(int) height,
(int) width,
3);
done = 1;
HDfree( pbuf );
HDfree( tbuf );
pbuf = NULL;
tbuf = NULL;
}
/*-------------------------------------------------------------------------
* there are no palettes
*-------------------------------------------------------------------------
*/
else
{
done = 0;
if ( opt.verbose )
{
printf("image <%s> has no palette...", name );
}
} /* no palettes */
} /* conversion to truecolor */
HDfree( ibuf );
ibuf = NULL;
return done;
out:
return -1;
}
/*-------------------------------------------------------------------------
* Function: make_jpeg_name
*
* Parameters: template name (IN), image name (IN), jpeg name (IN/OUT)
*
* Purpose: build a name for the jpeg image file upon a template name
* and the HDF5 image name. Replace the special characters
* '%', '@', '$', '/', ':', '&', ' ', and '*' with '_'
*
* Return: void
*
*-------------------------------------------------------------------------
*/
static
void make_jpeg_name( const char* template_name, const char* image_name, char* jpeg_name)
{
int j;
int len;
HDstrcpy( jpeg_name, template_name );
HDstrcat( jpeg_name, image_name );
HDstrcat( jpeg_name, ".jpeg" );
len = HDstrlen( jpeg_name);
/* HDF5 path names might contain '/', replace with '_' */
for (j = 0; j < len; j++)
{
if ( (jpeg_name[j] == '/') ||
(jpeg_name[j] == '%') ||
(jpeg_name[j] == '@') ||
(jpeg_name[j] == '$') ||
(jpeg_name[j] == '/') ||
(jpeg_name[j] == ':') ||
(jpeg_name[j] == '&') ||
(jpeg_name[j] == ' ') ||
(jpeg_name[j] == '*') )
{
jpeg_name[j] = '_';
}
}
}
/*-------------------------------------------------------------------------
* Function: convert_to_true
*
* Parameters: WIDTH (IN): width of image
* HEIGHT (IN): height of image
* IBUF (IN): indexed image buffer
* PBUF (IN): palette buffer
* TBUF (IN/OUT): true color image buffer
*
* Purpose: convert a greycolor buffer to a true color buffer using a palette buffer
*
* Return: void
*
*-------------------------------------------------------------------------
*/
static
void convert_to_true( hsize_t width, hsize_t height, unsigned char* ibuf, unsigned char* pbuf, unsigned char* tbuf)
{
hsize_t i, j;
for ( i = 0, j = 0; i < width * height; i++, j += 3)
{
unsigned char idx;
unsigned char r;
unsigned char g;
unsigned char b;
/* get the index from the grey image */
idx = ibuf[i];
/* get the RGB color */
r = pbuf[3*idx];
g = pbuf[3*idx+1];
b = pbuf[3*idx+2];
/* define the color buffer */
tbuf[j] = r;
tbuf[j+1] = g;
tbuf[j+2] = b;
}
}
/*-------------------------------------------------------------------------
* Function: write_JPEG_file (adapted from example.c of jpeg distribution)
*
* Purpose: save a jpeg file named FILENAME, using the image buffer IMAGE_BUFFER
*
* The standard input image format is a rectangular array of pixels, with
* each pixel having the same number of "component" values (color channels).
* Each pixel row is an array of JSAMPLEs (which typically are unsigned chars).
* If you are working with color data, then the color values for each pixel
* must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit
* RGB color.
*
* Return: void, exits on error
*
*-------------------------------------------------------------------------
*/
static
void write_JPEG_file(char *filename, /* JPEG file name */
JSAMPLE *image_buffer, /* Points to large array of R,G,B-order data */
int image_height, /* Number of rows in image */
int image_width, /* Number of columns in image */
int planes) /* # of color components per pixel */
{
/* This struct contains the JPEG compression parameters and pointers to
* working space (which is allocated as needed by the JPEG library).
* It is possible to have several such structures, representing multiple
* compression/decompression processes, in existence at once. We refer
* to any one struct (and its associated working data) as a "JPEG object".
*/
struct jpeg_compress_struct cinfo;
/* This struct represents a JPEG error handler. It is declared separately
* because applications often want to supply a specialized error handler
* (see the second half of this file for an example). But here we just
* take the easy way out and use the standard error handler, which will
* print a message on stderr and call exit() if compression fails.
* Note that this struct must live as long as the main JPEG parameter
* struct, to avoid dangling-pointer problems.
*/
struct jpeg_error_mgr jerr;
/* More stuff */
FILE * outfile; /* target file */
JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
int row_stride; /* physical row width in image buffer */
/* Step 1: allocate and initialize JPEG compression object */
/* We have to set up the error handler first, in case the initialization
* step fails. (Unlikely, but it could happen if you are out of memory.)
* This routine fills in the contents of struct jerr, and returns jerr's
* address which we place into the link field in cinfo.
*/
cinfo.err = jpeg_std_error(&jerr);
/* Now we can initialize the JPEG compression object. */
jpeg_create_compress(&cinfo);
/* Step 2: specify data destination (eg, a file) */
/* Note: steps 2 and 3 can be done in either order. */
/* Here we use the library-supplied code to send compressed data to a
* stdio stream. You can also write your own code to do something else.
* VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
* requires it in order to write binary files.
*/
if ((outfile = fopen(filename, "wb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
exit(1);
}
jpeg_stdio_dest(&cinfo, outfile);
/* Step 3: set parameters for compression */
/* First we supply a description of the input image.
* Four fields of the cinfo struct must be filled in:
*/
cinfo.image_width = image_width; /* image width and height, in pixels */
cinfo.image_height = image_height;
cinfo.input_components = planes; /* # of color components per pixel */
/* colorspace of input image */
if (planes == 3)
cinfo.in_color_space = JCS_RGB;
else if (planes == 1)
cinfo.in_color_space = JCS_GRAYSCALE;
/* Now use the library's routine to set default compression parameters.
* (You must set at least cinfo.in_color_space before calling this,
* since the defaults depend on the source color space.)
*/
jpeg_set_defaults(&cinfo);
/* Now you can set any non-default parameters you wish to.
* Here we just illustrate the use of quality (quantization table) scaling:
*/
jpeg_set_quality(&cinfo, 100, TRUE /* limit to baseline-JPEG values */);
/* Step 4: Start compressor */
/* TRUE ensures that we will write a complete interchange-JPEG file.
* Pass TRUE unless you are very sure of what you're doing.
*/
jpeg_start_compress(&cinfo, TRUE);
/* Step 5: while (scan lines remain to be written) */
/* jpeg_write_scanlines(...); */
/* Here we use the library's state variable cinfo.next_scanline as the
* loop counter, so that we don't have to keep track ourselves.
* To keep things simple, we pass one scanline per call; you can pass
* more if you wish, though.
*/
row_stride = image_width * planes; /* JSAMPLEs per row in image_buffer */
while (cinfo.next_scanline < cinfo.image_height) {
/* jpeg_write_scanlines expects an array of pointers to scanlines.
* Here the array is only one element long, but you could pass
* more than one scanline at a time if that's more convenient.
*/
row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
(void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
}
/* Step 6: Finish compression */
jpeg_finish_compress(&cinfo);
/* After finish_compress, we can close the output file. */
fclose(outfile);
/* Step 7: release JPEG compression object */
/* This is an important step since it will release a good deal of memory. */
jpeg_destroy_compress(&cinfo);
/* And we're done! */
}

View File

@ -1,96 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
#
# Tests for the h52jpeg tool
# Pedro Vicente Nunes (THG), 6/16/2008
TOOL=h52jpeg # The tool name
TOOL_BIN=`pwd`/$TOOL # The path of the tool binary
SRCFILE=h52jpegtst.h5
INDIR=$srcdir/testfiles
TESTFILE="$INDIR/$SRCFILE"
nerrors=0
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
#
TESTING() {
SPACES=" "
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Just call the tool binary with the command line parameters
# and use the return value of main to print FAILED or PASSED
#
TOOLTEST()
{
# Run test.
# Tflops interprets "$@" as "" when no parameter is given (e.g., the
# case of missing file name). Changed it to use $@ till Tflops fixes it.
if [ "`uname -s`" = "TFLOPS O/S" ]; then
$RUNSERIAL $TOOL_BIN $@
else
$RUNSERIAL $TOOL_BIN "$@"
fi
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
}
##############################################################################
# The tests
# To avoid the printing of the complete full path of the test file, that hides
# all the other parameters for long paths, the printing of the command line
# is done first in
# TESTING with the name only of the test file $TOOL, not its full path $TESTFILE
##############################################################################
# Test for traversing the file and export all images using defaults
TESTING $TOOL $SRCFILE myjpeg1
TOOLTEST $TESTFILE myjpeg1
# Test for reading an image path
TESTING $TOOL -i im8_1pal $SRCFILE myjpeg2
TOOLTEST -i im8_1pal $TESTFILE myjpeg2
# Test for conversion HDF5 8bit ---> jpeg true, use the default palette
TESTING $TOOL -c $SRCFILE myjpeg3
TOOLTEST -c $TESTFILE myjpeg3
# Test for conversion HDF5 8bit ---> jpeg true, use a palette
TESTING $TOOL -c -p 1 $SRCFILE myjpeg4
TOOLTEST -c -p 1 $TESTFILE myjpeg4
if test $nerrors -eq 0 ; then
echo "All $TOOL tests passed."
fi
exit $nerrors

View File

@ -1,268 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "hdf5.h"
#include "hdf5_hl.h"
#include "H5private.h"
#include "h52jpegtst.h"
#include <stdlib.h>
#include <string.h>
#define IM_1PAL "im8_1pal"
#define IM_2PAL "im8_2pal"
#define PAL1 "pal1"
#define PAL2 "pal2"
static int make_images( hid_t fid );
static int read_data(const char* fname, hsize_t *width, hsize_t *height );
unsigned char *gbuf = NULL; /* global buffer for image data */
/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: h52jpegtst main program. Generate images to be used
* by h52jpeg tests
*
* Programmer: Pedro Vicente, pvn@hdfgroup.org
*
* Date: May 30, 2008
*
*-------------------------------------------------------------------------
*/
int main( void )
{
hid_t fid; /* HDF5 file identifier */
/* create a new HDF5 file using default properties. */
if (( fid = H5Fcreate( "h52jpegtst.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT )) < 0 )
return 1;
/* make images */
if ( make_images( fid ) < 0 )
goto out;
/* close the file. */
H5Fclose( fid );
return 0;
out:
printf("Error on return function...Exiting\n");
H5Fclose( fid );
return 1;
}
/*-------------------------------------------------------------------------
* Function: make_images
*
* Purpose: generate images
*
*-------------------------------------------------------------------------
*/
static int make_images( hid_t fid )
{
hid_t gid;
hsize_t width; /* width of image */
hsize_t height; /* height of image */
hsize_t pal_dims[2] = {PAL_ENTRIES,3}; /* palette dimensions */
unsigned char pal[ PAL_ENTRIES * 3 ]; /* palette array */
int i, n;
/*-------------------------------------------------------------------------
* indexed image with 1 palette
*-------------------------------------------------------------------------
*/
/* read first data file */
if ( read_data( "image8.txt", &width, &height ) < 0 )
goto out;
/* make the image */
if ( H5IMmake_image_8bit( fid, IM_1PAL, width, height, gbuf ) < 0 )
goto out;
/* make a palette */
if ( H5IMmake_palette( fid, PAL1, pal_dims, pal_rgb ) < 0 )
goto out;
/* attach the 1st palette to the image */
if ( H5IMlink_palette( fid, IM_1PAL, PAL1 ) < 0 )
{
goto out;
}
/*-------------------------------------------------------------------------
* indexed image with 2 palettes
*-------------------------------------------------------------------------
*/
/* make the image */
if ( H5IMmake_image_8bit( fid, IM_2PAL, width, height, gbuf ) < 0 )
goto out;
/* attach the 1st palette to the image */
if ( H5IMlink_palette( fid, IM_2PAL, PAL1 ) < 0 )
{
goto out;
}
/*-------------------------------------------------------------------------
* define another palette, green tones
*-------------------------------------------------------------------------
*/
for ( i = 0, n = 0; i < PAL_ENTRIES*3; i+=3, n++)
{
pal[i] =0; /* red */
pal[i+1]=n; /* green */
pal[i+2]=0; /* blue */
}
/* save the palette */
if ( H5IMmake_palette( fid, PAL2, pal_dims, pal ) < 0 )
goto out;
/* attach the palette to the image */
if ( H5IMlink_palette( fid, IM_2PAL, PAL2 ) < 0 )
{
goto out;
}
/*-------------------------------------------------------------------------
* make another image, in a group and no palette
*-------------------------------------------------------------------------
*/
if (( gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0 )
goto out;
/* make the image with a name with "%", "@", "$", "/", ":", "&", and "*" */
if ( H5IMmake_image_8bit( gid, "1%2@3$45:6&7*", width, height, gbuf ) < 0 )
goto out;
H5Gclose(gid);
/*-------------------------------------------------------------------------
* true color image with pixel interlace in RGB type
*-------------------------------------------------------------------------
*/
/* read second data file */
if ( read_data( "image24pixel.txt", &width, &height ) < 0 )
goto out;
/* make dataset */
if ( H5IMmake_image_24bit( fid, "img24", width, height, "INTERLACE_PIXEL", gbuf ) < 0 )
goto out;
return 0;
out:
printf("Error on return function...Exiting\n");
return -1;
}
/*-------------------------------------------------------------------------
* read_data
* utility function to read ASCII image data
* the files have a header of the type
*
* components
* n
* height
* n
* width
* n
*
* followed by the image data
*
*-------------------------------------------------------------------------
*/
static int read_data( const char* fname, /*IN*/
hsize_t *width, /*OUT*/
hsize_t *height /*OUT*/ )
{
int i, n;
int color_planes;
char str[20];
FILE *f;
int w, h;
char *srcdir = getenv("srcdir"); /* the source directory */
char data_file[512]=""; /* buffer to hold name of existing data file */
/*-------------------------------------------------------------------------
* compose the name of the file to open, using "srcdir", if appropriate
*-------------------------------------------------------------------------
*/
strcpy(data_file, "");
if (srcdir)
{
strcpy(data_file, srcdir);
strcat(data_file, "/");
}
strcat(data_file,fname);
/*-------------------------------------------------------------------------
* read
*-------------------------------------------------------------------------
*/
f = fopen(data_file, "r");
if ( f == NULL )
{
printf( "Could not open file %s. Try set $srcdir \n", data_file );
return -1;
}
fscanf( f, "%s", str );
fscanf( f, "%d", &color_planes );
fscanf( f, "%s", str );
fscanf( f, "%d", &h);
fscanf( f, "%s", str );
fscanf( f, "%d", &w);
*width = (hsize_t)w;
*height = (hsize_t)h;
if ( gbuf )
{
free( gbuf );
gbuf=NULL;
}
gbuf = (unsigned char*) malloc (w * h * color_planes * sizeof( unsigned char ));
for (i = 0; i < h * w * color_planes ; i++)
{
fscanf( f, "%d",&n );
gbuf[i] = (unsigned char)n;
}
fclose(f);
return 1;
}

View File

@ -1,286 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _PAL_RGB_H
#define _PAL_RGB_H
#define PAL_ENTRIES 256
const unsigned char pal_rgb[PAL_ENTRIES*3] = {0,0,0,
0,0,131,
0,0,135,
0,0,139,
0,0,143,
0,0,147,
0,0,151,
0,0,155,
0,0,159,
0,0,163,
0,0,167,
0,0,171,
0,0,175,
0,0,179,
0,0,183,
0,0,187,
0,0,191,
0,0,195,
0,0,199,
0,0,203,
0,0,207,
0,0,211,
0,0,215,
0,0,219,
0,0,223,
0,0,227,
0,0,231,
0,0,235,
0,0,239,
0,0,243,
0,0,247,
0,0,251,
0,0,255,
0,0,255,
0,3,255,
0,7,255,
0,11,255,
0,15,255,
0,19,255,
0,23,255,
0,27,255,
0,31,255,
0,35,255,
0,39,255,
0,43,255,
0,47,255,
0,51,255,
0,55,255,
0,59,255,
0,63,255,
0,67,255,
0,71,255,
0,75,255,
0,79,255,
0,83,255,
0,87,255,
0,91,255,
0,95,255,
0,99,255,
0,103,255,
0,107,255,
0,111,255,
0,115,255,
0,119,255,
0,123,255,
0,127,255,
0,131,255,
0,135,255,
0,139,255,
0,143,255,
0,147,255,
0,151,255,
0,155,255,
0,159,255,
0,163,255,
0,167,255,
0,171,255,
0,175,255,
0,179,255,
0,183,255,
0,187,255,
0,191,255,
0,195,255,
0,199,255,
0,203,255,
0,207,255,
0,211,255,
0,215,255,
0,219,255,
0,223,255,
0,227,255,
0,231,255,
0,235,255,
0,239,255,
0,243,255,
0,247,255,
0,251,255,
0,255,255,
0,255,255,
3,255,251,
7,255,247,
11,255,243,
15,255,239,
19,255,235,
23,255,231,
27,255,227,
31,255,223,
35,255,219,
39,255,215,
43,255,211,
47,255,207,
51,255,203,
55,255,199,
59,255,195,
63,255,191,
67,255,187,
71,255,183,
75,255,179,
79,255,175,
83,255,171,
87,255,167,
91,255,163,
95,255,159,
99,255,155,
103,255,151,
107,255,147,
111,255,143,
115,255,139,
119,255,135,
123,255,131,
127,255,127,
131,255,123,
135,255,119,
139,255,115,
143,255,111,
147,255,107,
151,255,103,
155,255,99,
159,255,95,
163,255,91,
167,255,87,
171,255,83,
175,255,79,
179,255,75,
183,255,71,
187,255,67,
191,255,63,
195,255,59,
199,255,55,
203,255,51,
207,255,47,
211,255,43,
215,255,39,
219,255,35,
223,255,31,
227,255,27,
231,255,23,
235,255,19,
239,255,15,
243,255,11,
247,255,7,
251,255,3,
255,255,0,
255,251,0,
255,247,0,
255,243,0,
255,239,0,
255,235,0,
255,231,0,
255,227,0,
255,223,0,
255,219,0,
255,215,0,
255,211,0,
255,207,0,
255,203,0,
255,199,0,
255,195,0,
255,191,0,
255,187,0,
255,183,0,
255,179,0,
255,175,0,
255,171,0,
255,167,0,
255,163,0,
255,159,0,
255,155,0,
255,151,0,
255,147,0,
255,143,0,
255,139,0,
255,135,0,
255,131,0,
255,127,0,
255,123,0,
255,119,0,
255,115,0,
255,111,0,
255,107,0,
255,103,0,
255,99,0,
255,95,0,
255,91,0,
255,87,0,
255,83,0,
255,79,0,
255,75,0,
255,71,0,
255,67,0,
255,63,0,
255,59,0,
255,55,0,
255,51,0,
255,47,0,
255,43,0,
255,39,0,
255,35,0,
255,31,0,
255,27,0,
255,23,0,
255,19,0,
255,15,0,
255,11,0,
255,7,0,
255,3,0,
255,0,0,
250,0,0,
246,0,0,
241,0,0,
237,0,0,
233,0,0,
228,0,0,
224,0,0,
219,0,0,
215,0,0,
211,0,0,
206,0,0,
202,0,0,
197,0,0,
193,0,0,
189,0,0,
184,0,0,
180,0,0,
175,0,0,
171,0,0,
167,0,0,
162,0,0,
158,0,0,
153,0,0,
149,0,0,
145,0,0,
140,0,0,
136,0,0,
131,0,0,
127,0,0
};
#endif /* _PAL_RGB_H */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff