changeset 1055:6fcb2fa90e23

Regression fix: make scaled multiscan images work again.
author corvid <corvid@lavabit.com>
date Tue, 28 Apr 2009 08:45:47 -0400
parents 7fd3f0a48588
children 5cb0b030de6f 485acc9e60e2
files src/dicache.c src/image.cc src/image.hh src/imgbuf.cc src/imgbuf.hh
diffstat 5 files changed, 10 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/dicache.c	Tue Apr 28 08:33:23 2009 -0400
+++ b/src/dicache.c	Tue Apr 28 08:45:47 2009 -0400
@@ -325,6 +325,7 @@
    }
    a_Bitvec_clear(DicEntry->BitVec);
    DicEntry->ScanNumber++;
+   a_Imgbuf_new_scan(DicEntry->v_imgbuf);
 }
 
 /*
--- a/src/image.cc	Tue Apr 28 08:33:23 2009 -0400
+++ b/src/image.cc	Tue Apr 28 08:45:47 2009 -0400
@@ -102,17 +102,6 @@
 }
 
 /*
- * Begin a new scan for a multiple-scan image
- */
-void a_Image_new_scan(DilloImage *Image, void *v_imgbuf)
-{
-   _MSG("a_Image_new_scan\n");
-   a_Bitvec_clear(Image->BitVec);
-   Image->ScanNumber++;
-   ((Imgbuf*)v_imgbuf)->newScan();
-}
-
-/*
  * Implement the write method
  */
 void a_Image_write(DilloImage *Image, uint_t y)
--- a/src/image.hh	Tue Apr 28 08:33:23 2009 -0400
+++ b/src/image.hh	Tue Apr 28 08:45:47 2009 -0400
@@ -58,7 +58,6 @@
 void a_Image_set_parms(DilloImage *Image, void *v_imgbuf, DilloUrl *url,
                        int version, uint_t width, uint_t height,
                        DilloImgType type);
-void a_Image_new_scan(DilloImage *image, void *v_imgbuf);
 void a_Image_write(DilloImage *Image, uint_t y);
 void a_Image_close(DilloImage *Image);
 
--- a/src/imgbuf.cc	Tue Apr 28 08:33:23 2009 -0400
+++ b/src/imgbuf.cc	Tue Apr 28 08:45:47 2009 -0400
@@ -115,3 +115,11 @@
    ((Imgbuf*)v_imgbuf)->copyRow(y, (byte *)newbuf);
 }
 
+/*
+ * Reset for a new scan from a multiple-scan image.
+ */
+void a_Imgbuf_new_scan(void *v_imgbuf)
+{
+   ((Imgbuf*)v_imgbuf)->newScan();
+}
+
--- a/src/imgbuf.hh	Tue Apr 28 08:33:23 2009 -0400
+++ b/src/imgbuf.hh	Tue Apr 28 08:45:47 2009 -0400
@@ -20,7 +20,7 @@
 int a_Imgbuf_last_reference(void *v_imgbuf);
 void a_Imgbuf_update(void *v_imgbuf, const uchar_t *buf, DilloImgType type,
                      uchar_t *cmap, uint_t width, uint_t height, uint_t y);
-
+void a_Imgbuf_new_scan(void *v_imgbuf);
 
 #ifdef __cplusplus
 }