Outputting images

This is a discussion on Outputting images within the C++ Programming forums, part of the General Programming Boards category; Hiya, sorry for posting *again*, but the previous topic title was full >.< I want to know, is it possible ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    20

    Outputting images

    Hiya, sorry for posting *again*, but the previous topic title was full >.<

    I want to know, is it possible for me to either:

    - Output an image to a file in between text outputs (I suppose this includes attaching an image from a file to a certain string or integer or whatever data type variable before use)

    - Change settings in microsoft Word so that I can use <something> or something similar to call for insertion of a picture I want.

    This would help me a lot, since I'm wanting to make a program that outputs both text and pictures in a coherent fashion during a loop that continues endlessly, or until I choose to end it, meaning if I can't get this to work it'll mean hours of copying/pasting pictures >.>

    Thanks a bundle for any comment or help on this .

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,687
    Can't you embed pictures in RTF (meaning, I've just tried it and it works)?
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    20
    I've never tried...I'm not that much of a wiz -_-

    But thank you. I'll get it to work now that I know I can...

  4. #4
    Registered User
    Join Date
    Apr 2007
    Posts
    20
    Okay, I see what you mean now, Salem.

    But that's not what I was aiming for. I mean, my program outputs text into a file, but I want it to output pictures into the same file as well.

    So far, I've tried to uncover how the code for Wordpad (.rtf) works with images...and I believe it saves it as a pile of hexadecimals, presumably giving the color for every pixel.
    So far, any efforts to either disrupt the picture, copy it or otherwise change it (while having the .rtf files open with notepad, so I can see the code they use) has failed, only to result in having the exact same thing displayed in the .rtf when I opened it after editing.

    Does anyone have a way to fix this so I can implement these pictures into my C++ code?

    (for one's information, I want to use ofstream to output something like: text [picture] text text [picture][picture][picture] text text)

    Thanks in advance.

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,687
    Well its going to be like base64 or MIME encoding as used by HTML, only different.

    I'm sure an actual RTF specification (say http://www.wotsit.org/) would tell you how to encode binary files as a series of printable characters.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered User
    Join Date
    Apr 2007
    Posts
    20
    Alright, I'll have a check on that. Thanks for the link .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. mirroring website with images on external host
    By cyberfish in forum Tech Board
    Replies: 1
    Last Post: 09-08-2008, 06:50 PM
  2. CBitmap + big images = bad?
    By dug in forum Windows Programming
    Replies: 18
    Last Post: 06-28-2003, 11:53 PM
  3. images, icons, and cursors, OH MY!
    By DarkViper in forum Windows Programming
    Replies: 3
    Last Post: 01-07-2003, 01:26 PM
  4. STL, Queues And Images
    By simly01 in forum C++ Programming
    Replies: 3
    Last Post: 06-24-2002, 12:31 PM
  5. A simple question on Images....
    By LonelyPlanetWa in forum C Programming
    Replies: 7
    Last Post: 05-20-2002, 07:34 AM

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