Coding

imagesize function in c

imagesize function in c - c programming - imagesize function returns the number of bytes required to store a bitimage.

imagesize function returns the number of bytes required to store a bitimage. This function is used when we are using getimage.

Declaration:- unsigned int imagesize(int left, int top, int right, int bottom);

C programming code for imagesize

#include <graphics.h>
#include <conio.h>
 
main()
{
   int gd = DETECT, gm, bytes;
   char array[100];
 
   initgraph(&gd, &gm, "C:\\TC\\BGI");
 
   circle(200, 200, 50);
   line(150, 200, 250, 200);
   line(200, 150, 200, 250);
 
   bytes = imagesize(150, 150, 250, 250);
   sprintf(array, "Number of bytes required to store required area = %d", bytes);
   outtextxy(10, 280, array);
 
   getch();
   closegraph();
   return 0;
}

About the author

Wikitechy Editor

Wikitechy Founder, Author, International Speaker, and Job Consultant. My role as the CEO of Wikitechy, I help businesses build their next generation digital platforms and help with their product innovation and growth strategy. I'm a frequent speaker at tech conferences and events.

Add Comment

Click here to post a comment

X