Re: About loading an image
- From: "Divya Rathore" <divyarathore_sp@xxxxxxxxxxx>
- Date: Sat, 16 Apr 2005 16:28:34 +0530
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,
>
>
.
- References:
- About loading an image
- From: ramsin
- About loading an image
- Prev by Date: Mouse hooks
- Next by Date: A silly question
- Previous by thread: Re: About loading an image
- Next by thread: Questions about fopen and printers
- Index(es):
Relevant Pages
|