 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Marco Guest
|
Posted: Tue Sep 26, 2006 2:35 pm Post subject: List of Jpeg images |
|
|
Hi,
I'm a beginner in c++ programming. I'm using borland c++ builder
2006. I would like to create a list of jpeg images and I only
found the class ImageList that process only bitmap and icons..
Any suggetion? Thanks |
|
| Back to top |
|
 |
Clayton Arends Guest
|
Posted: Tue Sep 26, 2006 8:40 pm Post subject: Re: List of Jpeg images |
|
|
If you don't need the list to be a component like TImageList then you can
create a list of JPEGs using either the standard template library (STL)
class std::list or the VCL TObjectList class. If you need the list to be a
component like TImageList, to be able to add/remove images at design-time,
then you will need to write a component or find a third-party solution. I
have created a similar component that works with TPicture and TGraphic
objects. TGraphic is the parent class of all image classes like TJPEGImage.
TPicture is a class that works with TGraphic classes without the developer
needing to know the exact type of the class.
Which approach do you think you would prefer?
- Clayton |
|
| Back to top |
|
 |
Daniel Schoeni Guest
|
Posted: Sun Jan 07, 2007 5:29 am Post subject: Re: List of Jpeg images |
|
|
Hi
| Quote: | 2006. I would like to create a list of jpeg images and I only
found the class ImageList that process only bitmap and icons..
|
jpegs are bitmaps.
so you open your jpegs with
Image1->Picture->LoadFromFile(FilePathInfo);
every Image in your ImageList must have the same size !
so if you have different sizes you first need to process it.
I used to copy it to a second image after calculating some parameters:
Image2->Canvas->StretchDraw(Rect(XOfs,YOfs,XOfs+XSize,YOfs+YSize),
Image1->Picture->Graphic );
then I added it to the ImageList:
ImageList1->Add(Image2->Picture->Bitmap, NULL);
don't forget:
#include <jpeg.hpp>
sincerly
Daniel |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Jan 10, 2007 12:57 am Post subject: Re: List of Jpeg images |
|
|
"Daniel Schoeni" <daniel.schoeni (AT) bluewin (DOT) ch> wrote in message
news:45a030a0 (AT) newsgroups (DOT) borland.com...
| Quote: | jpegs are bitmaps.
|
No, they are not.
| Quote: | so you open your jpegs with
Image1->Picture->LoadFromFile(FilePathInfo);
|
Being a bitmap or not has no effect on that. TPicture supports any
image format that a TGraphic-derived class is available for. The VCL
has such classes available for BMP, ICO, WMF, EMF, and JPG images by
default.
| Quote: | every Image in your ImageList must have the same size !
so if you have different sizes you first need to process it.
|
You can't load JPG images into a TImageList. It can only load BMP and
ICO images.
Gambit |
|
| Back to top |
|
 |
Michel Leunen Guest
|
Posted: Wed Jan 10, 2007 2:21 am Post subject: Re: List of Jpeg images |
|
|
Remy Lebeau (TeamB) wrote:
| Quote: | "Daniel Schoeni" <daniel.schoeni (AT) bluewin (DOT) ch> wrote in message
jpegs are bitmaps.
No, they are not.
|
Hmm, that's arguable. Basically, there are two types of graphics: bitmap
graphics and vector graphics. A jpeg is definitely not a vector image,
it's a compressed bitmap. But I agree that for BCB, jpeg aren't Bitmaps
as far as type is concerned.
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
---------------------------------------- |
|
| Back to top |
|
 |
Clayton Arends Guest
|
Posted: Wed Jan 10, 2007 10:19 pm Post subject: Re: List of Jpeg images |
|
|
| Quote: | Basically, there are two types of graphics: bitmap graphics and vector
graphics.
|
To be completely accurate that should read "raster graphics and vector
graphics". If you want to make the case that raster = bitmap you can.
Personally, I'm in the camp that believes bitmap = the BMP file/memory
format.
- Clayton |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|