Output of image files

This is a discussion on Output of image files within the C++ Programming forums, part of the General Programming Boards category; Hello hello I'm totally jammed with images, mainly jpeg/jpg and I hope you understand what I try to explain now ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    24

    Question Output of image files

    Hello hello I'm totally jammed with images, mainly jpeg/jpg and I hope you understand what I try to explain now
    I've been trying to read a should-be-simple jpg of pixel size of 1x1 and same sized 16-colored bmp image. I made that pixel white (255, 255, 255) but can't read nor output it (I use dos).
    I just get weird values with fread().

    It seems, size 1x1 makes the file size 122 and 2x2 655 bytes if that has something to do with it?

    Shortly said I want to read header and pixels of the file and output the pixels with right colors on dos screen.

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Have you looked over the file format specifications for these file types so you know where abouts in the file the pixel data is?

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    No JPEG has to do with the amount of similar color 'areas' there are in the image. Go to www.wotsit.org to look up the JPG format. It's rather complex.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    24
    ok, gotta learn then, thanks to both

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. saving bmp image files
    By aniramg69 in forum C Programming
    Replies: 10
    Last Post: 12-30-2008, 10:08 AM
  2. Input & output image file in C++
    By rosicky2005 in forum C++ Programming
    Replies: 7
    Last Post: 12-06-2006, 02:13 PM
  3. Base converter libary
    By cdonlan in forum C++ Programming
    Replies: 22
    Last Post: 05-15-2005, 02:11 AM
  4. Help! (serial number, image files)
    By param in forum C Programming
    Replies: 1
    Last Post: 01-18-2003, 03:54 PM
  5. Need Help With Naming Output Files!!!
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 12-12-2001, 12:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21