Haha, you guys seem to be having fun.
Thanks a lot for all the help! I've successfully been able to read from the header all the necessary information and so I'm just working on a nifty encryption...
Type: Posts; User: kallistine
Haha, you guys seem to be having fun.
Thanks a lot for all the help! I've successfully been able to read from the header all the necessary information and so I'm just working on a nifty encryption...
Actually, I think I will get more out of this assignment if I learn how to extract things from the header, I will try to implement what MK27 did. Thanks a lot!
Thanks for all the suggestions but despite my constant resizing being inefficient, it's part of the directions, so I will follow that.
I have inserted
if((bitmap->size >300000) &&...
Thanks! The realloc is working correctly now, but it seems to increase indefinitely, is this because there's something wrong with how my fread is working? Is this due to the fact that I lack some...
At the top of the program, after the includes, there is
#define n 10000
I have put in some edits, but now there is a compile error regarding the reassigned n value,
n = n*2
error: invalid...
That is what I'm asked to do, just encrypt image data, keeping header intact.
So currently my main looks like this
int main(int argc, char* argv[]){
FILE* in;
Bitmap* map = malloc(sizeof(Bitmap));
if(argc <=3){
printf("Usage: %s [-e] [-d] inputFileName...
I think I can agree with you now Salem. Do you think then my readImage function is written okay? So now in my encrypt function I just start applying changes to the bytes starting from array[54]?
So the struct of the bitmap is like this, and I'm not sure how to get height and width if I don't read specifics in the header.
typedef struct {
char* data;
char* header;
int height;
...
Some links have been given to me with good information on the header, but the way my assignment reads, the header part doesn't need to be encrypted, and should just be copied back to the new image,...
that's actually what I was thinking, but I'm not sure about the struct, it seems like those things need to be declared at some point.
Thanks for the links, I looked into them and they really seem very complicated. I think I'm supposed to be doing something much simpler.
I searched back a few pages but didn't find anything, could you direct me to some of those pages? Thanks a lot.
I have a question regarding reading a bitmap image into an array. I understand that usually the first 54 bytes of the bitmap is for the header information, and basically I need to be able to read the...