No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
How can I load jpeg image and get the colour value on each pixel using borland c++ 5.5? |
|
I don't have graphics.h and library. I could not find on internet. My project consists of loading images and define a grid on the images to manipulate. Which way is the best to do? I want to keep up with Borland because I wrote some code in it. |
|
Below did not work. Is there anyother way? #include<stdio.h> #include<math.h> const int No=2; int* mat_sum(int[][No], int[][No],int); void main(){ int A[No][No]={{0,2},{0,1}}; int B[No][No]={{0,1},{1,0}}; int *Result=0; Result=mat_sum(A,B,No); } int* mat_sum (int A[][No], int B[][No],int length){ int *C=new int[No][No]; for (int i=0;i<length;i++){ for (int j=0;j<length;j++){ C[i][j]=0; C[i][j]=A[i][j]+B[i][j]; // printf("%2d",C[i][j]); } } return C; … |