Skip to content

Commit

Permalink
updated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MalcolmMcLean committed May 18, 2018
1 parent 4e00732 commit d91c68d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions loadtiff.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@
To use
int width, height;
unsigned char *rgba;
unsigned char *data;
int format;
FILE *fp = fopen("tiffile.tiff", "rb");
if(!fp)
errorhandling();
rgba = floadtiff(fp, &width, &height);
data = floadtiff(fp, &width, &height, &format);
fclose(fp);
if(rgba == 0)
if(data == 0)
printf("TIFF file unreadable\n");
rgba is a red, green, blue, alpha 32 bit buffer,
data format given by format - it's 8 bit channels
with alpha (if any) last.
alpha is premultiplied = composted on black. To get
the image composted on white, call floadtiffwhite()
width is image width, height is image height in pixels
*/

Expand Down

0 comments on commit d91c68d

Please sign in to comment.