Search:

Type: Posts; User: igor

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,422

    Thanks for the replies guys, @Click_here there is...

    Thanks for the replies guys, @Click_here there is an if statement checking to see if fp exists there, and it prints out the values correctly so it does read it.

    @Salem thankyou for that im not...
  2. Replies
    24
    Views
    31,732

    [QUOTE=christop;1122134]These three lines are a...

    [QUOTE=christop;1122134]These three lines are a buffer overflow. array[13] does not exist. It is one char past the end of the array.

    you're a legend! thanks so much for you're help!
  3. Replies
    24
    Views
    31,732

    Here is the code; char filename[20]; FILE...

    Here is the code;


    char filename[20];
    FILE *image;
    header data;
    unsigned char array[13];


    printf("Enter File Name: \n");
  4. Replies
    5
    Views
    1,422

    Storing color components in 1D arrays

    Ive read a .BMP file correctly, getting the width height and image offset data where the image files begin. i now need to read the struct containing the imagecomponents of the image (blue green and...
  5. Replies
    24
    Views
    31,732

    ahh okay, worked it out thanks a lot!! :D all...

    ahh okay, worked it out thanks a lot!! :D all seems to work fine (from the first 2 structures) on both little and big endien - EXCEPT one member, imagedataoffset is getting different results when...
  6. Replies
    24
    Views
    31,732

    thanks a lot - and yeah im aware of the few...

    thanks a lot - and yeah im aware of the few little issues (with fread before open and %d instead of %u for unsigned int - though that was just a quick test to see if i was getting right values and...
  7. Replies
    24
    Views
    31,732

    Thanks for your reply. Regarding using int in the...

    Thanks for your reply. Regarding using int in the structs - this is the format given in the assignment outline, so i have no choice ;)

    I attempted to use #pragma pack (just for the 1 structure)...
  8. Replies
    24
    Views
    31,732

    so back on topic :P as stated in post 5 is the...

    so back on topic :P as stated in post 5 is the format of a bmp file, specified in the outline - what would be the best way to read the file? I can read the file using the first structure - however am...
  9. Replies
    24
    Views
    31,732

    I wish it was that easy - unfortunately as a...

    I wish it was that easy - unfortunately as a first year electrical engineer at university we are required to undertake a C programming course - this is an assignment. Seems like quite a difficult one...
  10. Replies
    24
    Views
    31,732

    Hi Salem, thanks a lot for your assistance - the...

    Hi Salem, thanks a lot for your assistance - the file format is the following;
    File Header > Info Header > Image Data

    with the structure as follows:

    insert

    typedef struct ...
  11. Replies
    24
    Views
    31,732

    Ohok thanks man heres what im up to so far, not...

    Ohok thanks man heres what im up to so far, not sure if thats right but... it gets the B and M right though



    #include <stdio.h>

    /* structs */
    typedef struct
    {
    unsigned char fileMarker1;...
  12. Replies
    24
    Views
    31,732

    BMP image files reading

    not 100% sure how im meant to read the image file and verify the first two cahracters are 'B' and 'M'

    using this struct:


    typedef struct
    {
    unsigned char fileMarker1; /* 'B' */
    unsigned char...
  13. Replies
    9
    Views
    2,537

    Thank you so much for your answer :) cleared up a...

    Thank you so much for your answer :) cleared up a few issues.
  14. Replies
    9
    Views
    2,537

    i dunno haha, its an assessment and am supposed...

    i dunno haha, its an assessment and am supposed to open/read the file.

    If the file is opened successfully, the program shall display the following message "U coded data" ( or P coded data )and...
  15. Replies
    9
    Views
    2,537

    thanks for your help...my main problem at the...

    thanks for your help...my main problem at the moment is actually trying to print the data from a .d file. This is just a sample of what i've done so far (i know error recovery methods and stuff are...
  16. Replies
    9
    Views
    2,537

    Binary file scanning and reading problem

    My program prompts the user to enter a file name and
    open the specified file.

    If the file is not found,the file format is not unsigned binary file U or the file size stores more than 64 values...
Results 1 to 16 of 16