277
287
ps->image = (unsigned char*)malloc(alloc_size * sizeof(unsigned char));
278
288
ps->image2 = (unsigned char*)malloc(alloc_size * sizeof(unsigned char));
282
290
if ((!ps->image)||(!ps->image2)||(!ps->image_buf)) {
283
291
reportError("Problem allocating memory for image %ix%i", w, h);
284
292
return DICT_ERROR_MALLOC;
287
298
if (TIFFReadRGBAImage(tif, w, h, (uint32_t*)ps->image_buf, 0)) {
288
299
#ifdef DICT_HW_MEASURE_TIMINGS
289
300
gettimeofday(&tv3, NULL);