Skip to main content
ffco ist not a valid hex literal, corrected
Source Link
Rob
  • 11.9k
  • 15
  • 68
  • 97

then you have to find hight and width marker of jpeg that is [ffco][ffc0].

after finding ffcoffc0 in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co]c0] d8 c3 c2 [ff da] [00 ff] | | | | ->height ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCOFFC0) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) { if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) ) { position=i; } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; *height=buffer_src[position]<<8|buffer_src[position+1]; *width=buffer_src[position+2]<<8|buffer_src[position+3]; printf("height %d",*height); printf("width %d",*width); 

then you have to find hight and width marker of jpeg that is [ffco].

after finding ffco in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co] d8 c3 c2 [ff da] [00 ff] | | | | ->height ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCO) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) { if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) ) { position=i; } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; *height=buffer_src[position]<<8|buffer_src[position+1]; *width=buffer_src[position+2]<<8|buffer_src[position+3]; printf("height %d",*height); printf("width %d",*width); 

then you have to find hight and width marker of jpeg that is [ffc0].

after finding ffc0 in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff c0] d8 c3 c2 [ff da] [00 ff] | | | | ->height ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFC0) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) { if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) ) { position=i; } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; *height=buffer_src[position]<<8|buffer_src[position+1]; *width=buffer_src[position+2]<<8|buffer_src[position+3]; printf("height %d",*height); printf("width %d",*width); 

then you have to find hight and width marker of jpeg that is [ffco].

after finding ffco in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co] d8 c3 c2 [ff da] [00 ff] | | | | ->hight >height ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCO) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) {  if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) )  {  position=i;  } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; *height=buffer_src[position]<<8|buffer_src[position+1]; *width=buffer_src[position+2]<<8|buffer_src[position+3]; } printf("height %d",*height); printf("width %d",*width); 

`

then you have to find hight and width marker of jpeg that is [ffco].

after finding ffco in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co] d8 c3 c2 [ff da] [00 ff] | | | | ->hight  ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCO) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) { if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) ) { position=i; } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; *height=buffer_src[position]<<8|buffer_src[position+1]; *width=buffer_src[position+2]<<8|buffer_src[position+3]; } printf("height %d",*height); printf("width %d",*width); 

`

then you have to find hight and width marker of jpeg that is [ffco].

after finding ffco in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co] d8 c3 c2 [ff da] [00 ff] | | | | ->height ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCO) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) {  if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) )  {  position=i;  } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; *height=buffer_src[position]<<8|buffer_src[position+1]; *width=buffer_src[position+2]<<8|buffer_src[position+3]; printf("height %d",*height); printf("width %d",*width); 
deleted 124 characters in body
Source Link
user3614789
  • 200
  • 1
  • 11

then you have to find hight and width marker of jpeg that is [ffco].

after finding ffco in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co] d8 c3 c2 [ff da] [00 ff] | | | | ->hight ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCO) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) { if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) ) { position=i; } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; len_con[0]=image_buffer[position+1]; len_con[1]=image_buffer[position]; *height=*(unsigned short *)len_con; len_con[0]=image_buffer[position+3]; len_con[1]=image_buffer[position+2];*height=buffer_src[position]<<8|buffer_src[position+1]; *width=*(unsigned short *)len_con;*width=buffer_src[position+2]<<8|buffer_src[position+3]; } printf("height %d",*height); printf("width %d",*width); 

`

then you have to find hight and width marker of jpeg that is [ffco].

after finding ffco in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co] d8 c3 c2 [ff da] [00 ff] | | | | ->hight ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCO) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) { if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) ) { position=i; } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; len_con[0]=image_buffer[position+1]; len_con[1]=image_buffer[position]; *height=*(unsigned short *)len_con; len_con[0]=image_buffer[position+3]; len_con[1]=image_buffer[position+2]; *width=*(unsigned short *)len_con; } printf("height %d",*height); printf("width %d",*width); 

`

then you have to find hight and width marker of jpeg that is [ffco].

after finding ffco in binary formate, the the four,five bytes are hight and six and seven bytes are width.

eg: [ff co] d8 c3 c2 [ff da] [00 ff] | | | | ->hight ->width int position; unsigned char len_con[2]; /*Extract start of frame marker(FFCO) of width and hight and get the position*/ for(i=0;i<FILE_SIZE;i++) { if((image_buffer[i]==FF) && (image_buffer[i+1]==c0) ) { position=i; } } /*Moving to the particular byte position and assign byte value to pointer variable*/ position=position+5; *height=buffer_src[position]<<8|buffer_src[position+1]; *width=buffer_src[position+2]<<8|buffer_src[position+3]; } printf("height %d",*height); printf("width %d",*width); 

`

Source Link
user3614789
  • 200
  • 1
  • 11
Loading