diff options
author | jcid <devnull@localhost> | 2008-03-26 15:46:46 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-03-26 15:46:46 +0100 |
commit | 072933308a1128555e6e56f519fdc9603d060d0f (patch) | |
tree | 2dddc7686d2209ad5392691dfcd362f494178735 /src/jpeg.c | |
parent | 5763bad3e2a95553ed799e73ffd640dfaf441ac0 (diff) |
- Added a_Capi_get_flags(). It requests a cache entry's status as flags.
Diffstat (limited to 'src/jpeg.c')
-rw-r--r-- | src/jpeg.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -35,6 +35,7 @@ #include "web.hh" #include "cache.h" #include "dicache.h" +#include "capi.h" /* get cache entry status */ #define DEBUG_LEVEL 6 #include "debug.h" @@ -289,13 +290,13 @@ static void Jpeg_write(DilloJpeg *jpeg, void *Buf, uint_t BufSize) jpeg->cinfo.num_components); /* - * Display multiple-scan images progressively if the amount of data is - * small (it is likely coming over a network). If the source of a - * multiple-scan image is the cache or local filesystem, let libjpeg - * decode the entire image first and provide output in a single scan. + * If a multiple-scan image is not completely in cache, + * use progressive display, updating as it arrives. */ - if ((BufSize < 2048) && jpeg_has_multiple_scans(&jpeg->cinfo)) + if (jpeg_has_multiple_scans(&jpeg->cinfo) && + !(a_Capi_get_flags(jpeg->url) & CAPI_Completed)) jpeg->cinfo.buffered_image = TRUE; + printf("jpeg: %s\n", jpeg->cinfo.buffered_image ? "TRUE":"FALSE"); a_Dicache_set_parms(jpeg->url, jpeg->version, jpeg->Image, (uint_t)jpeg->cinfo.image_width, |