Advertisement
Guest User

Untitled

a guest
Jan 14th, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.96 KB | None | 0 0
  1.  
  2.  
  3.     if (!TIFFRGBAImageOK(md->doc.tiff, emsg))
  4.         return;
  5.  
  6.     if (TIFFRGBAImageBegin(&md->page.img, md->doc.tiff, 0, emsg))
  7.     {
  8.         unsigned int *raster;
  9.         unsigned int width;
  10.         unsigned int height;
  11.  
  12.         /* scale first */
  13.         width = (unsigned int)(md->page.img.width * md->page.hscale);
  14.         height = (unsigned int)(md->page.img.height * md->page.vscale);
  15.         raster = (unsigned int *)_TIFFmalloc(width * height * sizeof(unsigned int));
  16.         if (!raster)
  17.             return;
  18.  
  19.         evas_object_image_size_set(md->efl.obj, width, height);
  20.         evas_object_resize(md->efl.obj, width, height);
  21.         md->page.width = width;
  22.         md->page.height = height;
  23.         md->page.raster = raster;
  24.         TIFFRGBAImageGet(&md->page.img, md->page.raster,
  25.                          md->page.width, md->page.height);
  26.         /* I pass the raster data to my toolkit */
  27.         TIFFRGBAImageEnd(&md->page.img);
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement