X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2Fbbox.c;h=1f245676bf0236598497349eaa7c045c288c912b;hb=c63b2bf21dc1df9a736f0b4c08f6cba828cdab92;hp=62d0839f59ca1b55d60717f27990898d833c16d0;hpb=3ce117f02ee66ea7e065b1373c35e7149ad1204f;p=swftools.git diff --git a/lib/pdf/bbox.c b/lib/pdf/bbox.c index 62d0839..1f24567 100644 --- a/lib/pdf/bbox.c +++ b/lib/pdf/bbox.c @@ -118,6 +118,7 @@ static void head_delete(context_t*context, head_t*h) assert(!h->prev); context->heads = h->next; } + free(h); } #define POINTS_TO_HEAD(ptr) (((head_t*)(ptr))->magic==HEAD_MAGIC) @@ -347,17 +348,26 @@ static void fix_small_boxes(context_t*context) while(h) { head_t*next = h->next; if(!h->seen) { - if(h->bbox.xmax - h->bbox.ymin < 16 - && h->bbox.ymax - h->bbox.ymin < 16) { + if(h->bbox.xmax - h->bbox.xmin < 32 + || h->bbox.ymax - h->bbox.ymin < 32) { head_t*other = search_vicinity(context, h, 64, costab, sintab); if(other) { merge(context, h->pos, other->pos); changed = 1; break; } else { + //printf("nothing in the vicinity of %d,%d,%d,%d\n", h->bbox); h->seen = 1; } - } + } /*else { + printf("area %d,%d,%d,%d is large enough (%dx%d)\n", + h->bbox.xmin, + h->bbox.ymin, + h->bbox.xmax, + h->bbox.ymax, + h->bbox.xmax - h->bbox.xmin, + h->bbox.ymax - h->bbox.ymin); + } */ } h = next; }