Thread: How to output an JPEG/GIF image in MSDOS

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    2

    How to output an JPEG/GIF image in MSDOS

    I want to output a JPEG or GIF image in MSDOS mode by C/C++. I'm using Win-98 and turbo-C V3 compiler. I would like to know how to output a JPEG or GIF image in MSDOS Command prompt mode. If some URLs regarding the topic is available, will be better for further reference. Remember, I just want to output the JPEG or GIF image in MSDOS mode only, no Windows resource or API.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Assuming you've mastered enough of graphics.h to plot pixels in a colour of your choice, the next step is to get to grips with the file formats

    GIF is pretty easy and only has 256 colours max (just like DOS). JPG is much more involved, and you're going to have to figure out how to reduce the 24 bit colour space in JPG down to 8 bits.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Shifting the colors right by 3 will fix the color space problem. Go to www.wotsit.org for the JPEG and about a trillion other file formats.

  4. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    2

    Thank you all

    Thank yuo all for suggesting me the way...Here Salem...can u tell me what good quick stuffs can i gather regarding graphics.h...with some urls...just for turboc V2/3 in MSDOS...Though I know it very good...but still searchin more...

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Graphics.h sucks. You need a 256 color BGI driver and even it is slower than death.

    Go here for better/easier graphics.
    www.brackeen.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to write image data to binary PGM file format(P5)?
    By tommy_chai in forum C Programming
    Replies: 6
    Last Post: 11-03-2007, 10:52 PM
  2. Image rotation - doesn't always work
    By ulillillia in forum C Programming
    Replies: 12
    Last Post: 05-03-2007, 12:46 PM
  3. making a proper image for floppy
    By EvBladeRunnervE in forum Tech Board
    Replies: 4
    Last Post: 07-31-2004, 11:27 PM
  4. Changing a treeview item's image
    By SMurf in forum Windows Programming
    Replies: 0
    Last Post: 01-14-2003, 07:08 PM
  5. Image rotation using intel image processing
    By sunis in forum Windows Programming
    Replies: 1
    Last Post: 11-18-2002, 02:40 AM