Re: About loading an image



Hi!

Yours is a bit more complex than just a programming issue. Let's sort it
out one step at a time. Do you know the format you are dealing with
(bmp/jpeg/tiff...)? You have proper decoders/encoders with you? Or do you
want them too? You might have to go through the theory/documentation too if
compressed images (say, jpg) are to be dealt with. This is so as you choose
not to use any libraries.

Once you have the image bits in memory say as integer values between 0 and
255 (I am sure you are conversant with what I am writing), then comes the
role of the operating system's API's (application programming interface)
role in displaying your image. For windows you have one of the options like
StretchDIBits for MFC. Similar ones would be available for Linux. You can't
bypass this step as pure C++ won't allow you to interact with the display
drivers 'just-like-that', unless ofcourse you havn't any defined deadlines
in terms of 'years of work'!

Do some more homework on your side and revert back. Finalize upon:
1. which compilers you would be using (vc++ and some unix compiler)
2. which OS dependent libraries you would be using (MFC for windows and
GTK for unix, correct me if I am wrong)

The only thing that remains independent of OS is the algorithm which
modifies the image (you into image processing?) and the image array
handling. If you are not going into STL side then any C++ book can give you
a nice introduction to array handling including creation (static/dynamic)
and memory allocation.

I have a confusion though.. do you at all want to display those images? Or
is it that you will open the image bits, modify them, save it again in the
appropriate format and then view them using some independent software
(MSpaint for windows)?

warm regards,
- Divya Rathore
www.ryze.com/go/divyarathore


"ramsin" <ramsin@xxxxxxxxxxxxx> wrote in message
news:OHnPTPgQFHA.3120@xxxxxxxxxxxxxxxxxxxxxxx
>
> Hi Group,
>
> I'm going to load an image file into memory and modify it then write it
out.
> Please consider this couldn't be using Microsoft classes. The code should
be
> running under both
> windows and linux so I have to go with standard C++.
>
> What classes should I consider to do thing in terms of array and memory
> managment?
>
>
> Any suggestions on this?
>
> Thanks in advance,
>
>


.



Relevant Pages

  • Re: Displaying pixels (OS framework)
    ... about early Windows programming methodologies: ... idea of windows systems, and built a graphics-based ... memory will be plenty and not to worry about. ... sub-monitor inside a larger screen/monitor. ...
    (microsoft.public.windowsxp.general)
  • Re: What will many cores mean to future Windows releases?
    ... I certainly do not see why a VM is necessary for a single hardware platform and OS. ... If I am writing a Windows only program for a Windows only platform for an X86 only processor core, why in the world would I want to use a VM? ... I can even see some need for VMed applications for server side based Web programming, where it could save taking down the entire systems for inadvertent memory leaks or buffer overruns. ...
    (borland.public.delphi.non-technical)
  • Re: MACHINE_CHECK_EXCEPTION errors
    ... just having Norton and MacAfee on the machine would make me want to format and reload. ... Seriously though, If you were having windows issues, and determined you were running on a bad stick of ram, even after replacing the ram problems can remain from the bad ram causing corruption. ... If you have not I would try at the least a repair install, preferable a format and fresh install, maybe on a second spare hard drive, to see if the problems clear up. ... Even with the new memory, ...
    (microsoft.public.windowsxp.perform_maintain)
  • Turning Windows into a personal developer OS environment
    ... This thesis is on a new simplified concept on Windows ... OS Display Management, based on my 1980's generic ideas ... about early Windows programming methodologies: ... memory will be plenty and not to worry about. ...
    (microsoft.public.vstudio.development)
  • Displaying pixels (OS framework)
    ... This thesis is on a new simplified concept on Windows ... OS Display Management, based on my 1980's generic ideas ... about early Windows programming methodologies: ... memory will be plenty and not to worry about. ...
    (microsoft.public.windowsxp.general)