This commit is contained in:
John Cupitt 2015-04-09 10:04:58 +01:00
parent 41b38f2fd2
commit 01bcb87583
2 changed files with 21 additions and 17 deletions

View File

@ -25,6 +25,7 @@ TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
SETUP_FILES = \
$(content_files) \
$(expand_content_files) \
$(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE)-sections.txt \
$(DOC_MODULE)-overrides.txt
@ -86,7 +87,7 @@ GTK_DOC_V_SETUP_0=@echo " DOC Preparing build";
setup-build.stamp:
-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
if test "x$$files" != "x" ; then \
for file in $$files ; do \
destdir=`dirname $(abs_builddir)/$$file`; \
@ -162,7 +163,7 @@ GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V))
GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY))
GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references";
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
$(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
mkhtml_options=""; \
gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
@ -194,7 +195,7 @@ GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V))
GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY))
GTK_DOC_V_PDF_0=@echo " DOC Building PDF";
pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
$(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
mkpdf_options=""; \
gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
@ -223,12 +224,15 @@ clean-local:
@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
rm -f $(DOC_MODULE).types; \
fi
@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
rm -f $(DOC_MODULE)-sections.txt; \
fi
distclean-local:
@rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
$(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
rm -f $(SETUP_FILES) $(DOC_MODULE).types; \
fi
maintainer-clean-local:

View File

@ -491,7 +491,7 @@ write_tiff_header( Write *write, Layer *layer )
TIFFSetField( tif, TIFFTAG_SAMPLESPERPIXEL, 1 );
TIFFSetField( tif, TIFFTAG_BITSPERSAMPLE, 1 );
TIFFSetField( tif, TIFFTAG_PHOTOMETRIC,
tw->miniswhite ?
write->miniswhite ?
PHOTOMETRIC_MINISWHITE :
PHOTOMETRIC_MINISBLACK );
}
@ -505,7 +505,7 @@ write_tiff_header( Write *write, Layer *layer )
switch( write->im->Bands ) {
case 1:
case 2:
photometric = tw->miniswhite ?
photometric = write->miniswhite ?
PHOTOMETRIC_MINISWHITE :
PHOTOMETRIC_MINISBLACK;
if( write->im->Bands == 2 ) {
@ -896,14 +896,14 @@ LabQ2LabC( VipsPel *q, VipsPel *p, int n )
/* Pack 8 bit VIPS to 1 bit TIFF.
*/
static void
eightbit2onebit( TiffWrite *tw, VipsPel *q, VipsPel *p, int n )
eightbit2onebit( Write *write, VipsPel *q, VipsPel *p, int n )
{
int x;
VipsPel bits;
/* Invert in miniswhite mode.
*/
int white = tw->miniswhite ? 0 : 1;
int white = write->miniswhite ? 0 : 1;
int black = white ^ 1;
bits = 0;
@ -953,10 +953,10 @@ eightbit2onebit( TiffWrite *tw, VipsPel *q, VipsPel *p, int n )
* the opposite conversion.
*/
static void
invert_band0( TiffWrite *tw, VipsPel *q, VipsPel *p, int n )
invert_band0( Write *write, VipsPel *q, VipsPel *p, int n )
{
VipsImage *im = tw->im;
gboolean invert = tw->miniswhite;
VipsImage *im = write->im;
gboolean invert = write->miniswhite;
int x, i;
@ -1042,10 +1042,10 @@ pack2tiff( Write *write, Layer *layer,
if( write->im->Coding == VIPS_CODING_LABQ )
LabQ2LabC( q, p, area->width );
else if( write->onebit )
eightbit2onebit( tw, q, p, area->width );
eightbit2onebit( write, q, p, area->width );
else if( (in->im->Bands == 1 || in->im->Bands == 2) &&
tw->miniswhite )
invert_band0( tw, q, p, area->width );
write->miniswhite )
invert_band0( write, q, p, area->width );
else if( write->im->BandFmt == VIPS_FORMAT_SHORT &&
write->im->Type == VIPS_INTERPRETATION_LABS )
LabS2Lab16( q, p, area->width );
@ -1135,12 +1135,12 @@ layer_write_strip( Write *write, Layer *layer, VipsRegion *strip )
p = write->tbuf;
}
else if( write->onebit ) {
eightbit2onebit( tw, tw->tbuf, p, im->Xsize );
eightbit2onebit( write, write->tbuf, p, im->Xsize );
p = write->tbuf;
}
else if( (im->Bands == 1 || im->Bands == 2) &&
tw->miniswhite ) {
invert_band0( tw, tw->tbuf, p, im->Xsize );
write->miniswhite ) {
invert_band0( write, write->tbuf, p, im->Xsize );
p = write->tbuf;
}