/[public]/psiconv/tags/rel-0-9-9/lib/psiconv/parse_image.c
ViewVC logotype

Diff of /psiconv/tags/rel-0-9-9/lib/psiconv/parse_image.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 270 Revision 351
1/* 1/*
2 parse_image.c - Part of psiconv, a PSION 5 file formats converter 2 parse_image.c - Part of psiconv, a PSION 5 file formats converter
3 Copyright (c) 1999-2005 Frodo Looijaard <frodo@frodo.looijaard.name> 3 Copyright (c) 1999-2014 Frodo Looijaard <frodo@frodo.looijaard.name>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
126 psiconv_u32 off, int *length,int isclipart, 126 psiconv_u32 off, int *length,int isclipart,
127 psiconv_paint_data_section *result) 127 psiconv_paint_data_section *result)
128{ 128{
129 int res = 0; 129 int res = 0;
130 int len = 0; 130 int len = 0;
131 psiconv_u32 size,offset,picsize,temp,datasize,color, 131 psiconv_u32 size,offset,temp,datasize,color,
132 redbits,bluebits,greenbits; 132 redbits,bluebits,greenbits;
133 psiconv_u8 byte; 133 psiconv_u8 byte;
134 int leng,i; 134 int leng,i;
135 psiconv_u32 bits_per_pixel,compression; 135 psiconv_u32 bits_per_pixel,compression;
136 psiconv_pixel_bytes bytes,decoded; 136 psiconv_pixel_bytes bytes,decoded;
175 (*result)->ysize = psiconv_read_u32(config,buf,lev+2,off+len,&res); 175 (*result)->ysize = psiconv_read_u32(config,buf,lev+2,off+len,&res);
176 if (res) 176 if (res)
177 goto ERROR3; 177 goto ERROR3;
178 psiconv_debug(config,lev+2,off+len,"Picture Y size: %08x:",(*result)->ysize); 178 psiconv_debug(config,lev+2,off+len,"Picture Y size: %08x:",(*result)->ysize);
179 len += 4; 179 len += 4;
180
181 picsize = (*result)->ysize * (*result)->xsize;
182 180
183 psiconv_progress(config,lev+2,off+len,"Going to read the real picture x size"); 181 psiconv_progress(config,lev+2,off+len,"Going to read the real picture x size");
184 (*result)->pic_xsize = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res); 182 (*result)->pic_xsize = psiconv_read_length(config,buf,lev+2,off+len,&leng,&res);
185 if (res) 183 if (res)
186 goto ERROR3; 184 goto ERROR3;

Legend:
Removed from v.270  
changed lines
  Added in v.351

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26