Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!TIFFRGBAImageOK(md->doc.tiff, emsg))
- return;
- if (TIFFRGBAImageBegin(&md->page.img, md->doc.tiff, 0, emsg))
- {
- unsigned int *raster;
- unsigned int width;
- unsigned int height;
- /* scale first */
- width = (unsigned int)(md->page.img.width * md->page.hscale);
- height = (unsigned int)(md->page.img.height * md->page.vscale);
- raster = (unsigned int *)_TIFFmalloc(width * height * sizeof(unsigned int));
- if (!raster)
- return;
- evas_object_image_size_set(md->efl.obj, width, height);
- evas_object_resize(md->efl.obj, width, height);
- md->page.width = width;
- md->page.height = height;
- md->page.raster = raster;
- TIFFRGBAImageGet(&md->page.img, md->page.raster,
- md->page.width, md->page.height);
- /* I pass the raster data to my toolkit */
- TIFFRGBAImageEnd(&md->page.img);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement