 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Nov 28, 2006 2:28 am Post subject: ImageList count increase by 50? |
|
|
Hello everyone,
I am loading a TImageList at runtime from the files in a certain
directory. Each time I call ImageList1->Add(), ImageList1->Count
increases by 50. Am I doing something wrong here or is this normal?
Thanks for future replies.
~fakepoo |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Nov 28, 2006 2:28 am Post subject: Re: ImageList count increase by 50? |
|
|
<fakepoo (AT) gmail (DOT) com> wrote in message
news:1164659335.071859.247490 (AT) h54g2000cwb (DOT) googlegroups.com...
| Quote: | I am loading a TImageList at runtime from the files in a certain
directory. Each time I call ImageList1->Add(), ImageList1->Count
increases by 50. Am I doing something wrong here or is this normal?
|
Are all of the images the same dimensions? Do those dimensions match the
ImageList's Width and Height properties?
Gambit |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Nov 28, 2006 3:19 am Post subject: Re: ImageList count increase by 50? |
|
|
Is that necessary? All I am doing is adding, one by one, .jpg files
from a directory into this list. I assume that these pictures could
possibly have different dimensions. As I stepped through the execution,
I noticed that ImageList1->Count went from 0 to 50 to 100 to 150 and so
on. I could probably use something like TList to do what I want to do
so it is not a big deal.
Thanks,
~fakepoo
Remy Lebeau (TeamB) wrote:
| Quote: | fakepoo (AT) gmail (DOT) com> wrote in message
news:1164659335.071859.247490 (AT) h54g2000cwb (DOT) googlegroups.com...
I am loading a TImageList at runtime from the files in a certain
directory. Each time I call ImageList1->Add(), ImageList1->Count
increases by 50. Am I doing something wrong here or is this normal?
Are all of the images the same dimensions? Do those dimensions match the
ImageList's Width and Height properties?
Gambit |
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Nov 28, 2006 5:35 am Post subject: Re: ImageList count increase by 50? |
|
|
<fakepoo (AT) gmail (DOT) com> wrote in message
news:1164662385.012119.67090 (AT) 14g2000cws (DOT) googlegroups.com...
| Quote: | Is that necessary?
|
Yes. The individual images must match the Width and Height that are set for
the ImageList. TImageList is just a simple wrapper around the Win32 API
ImageList control, which does not support mixing images of different
dimensions.
| Quote: | All I am doing is adding, one by one, .jpg files from a directory into
this list. |
You can't put a JPG image into an ImageList control. It only supports ICO
and BMP images.
| Quote: | I assume that these pictures could possibly have different dimensions.
|
Then you have a problem.
| Quote: | As I stepped through the execution, I noticed that ImageList1->Count
went from 0 to 50 to 100 to 150 and so on.
|
What are the actual dimensions of the images? What are the Width and Height
of the TImageList actually set to? When adding an image to an ImageList,
the image can be split into multiple images if the dimensions do not match.
Gambit |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Nov 28, 2006 7:10 pm Post subject: Re: ImageList count increase by 50? |
|
|
I see. That must be what is happening. My ImageList has a width of 16
and the images have a width of 800 (50 * 16). Because of this, I will
probably store these bitmaps in a different list such as TList or a
data structure of my own.
As for loading the JPG, I load it to a TJPEGImage then assign a new
bitmap from the image.
Thanks for all of the help.
~fakepoo
Remy Lebeau (TeamB) wrote:
| Quote: | fakepoo (AT) gmail (DOT) com> wrote in message
news:1164662385.012119.67090 (AT) 14g2000cws (DOT) googlegroups.com...
Is that necessary?
Yes. The individual images must match the Width and Height that are set for
the ImageList. TImageList is just a simple wrapper around the Win32 API
ImageList control, which does not support mixing images of different
dimensions.
All I am doing is adding, one by one, .jpg files from a directory into
this list.
You can't put a JPG image into an ImageList control. It only supports ICO
and BMP images.
I assume that these pictures could possibly have different dimensions.
Then you have a problem.
As I stepped through the execution, I noticed that ImageList1->Count
went from 0 to 50 to 100 to 150 and so on.
What are the actual dimensions of the images? What are the Width and Height
of the TImageList actually set to? When adding an image to an ImageList,
the image can be split into multiple images if the dimensions do not match.
Gambit |
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Nov 29, 2006 12:42 am Post subject: Re: ImageList count increase by 50? |
|
|
<fakepoo (AT) gmail (DOT) com> wrote in message
news:1164719446.320035.254870 (AT) n67g2000cwd (DOT) googlegroups.com...
| Quote: | My ImageList has a width of 16 and the images have a width of 800 (50 *
16). |
That would do it. You need to set the ImageList's Width to 800 to avoid
that.
Gambit |
|
| 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
|
|