Rank: Member
Groups: Member
Joined: 8/19/2006(UTC) Posts: 7
|
Hi, I have question regarding combining the pictures. Your current feature of "DrawOnBitmap" is only for picture on picture. For example, there are few pictures with different size/dimensions. How can I put them on one picture with same size? and add text on each picture?final result likes this: http://forum.yorkbbs.ca/...9/20060707_225909_96.jpg
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
To glue several images together, you need to create new empty large bitmap and put necessary images on it. E.g. you want to put 200x300 images in 3 rows and 4 columns. The background bitmap should have size 600x1200 (200*3x300*4). After that load images one by one and draw on this bitmap near each other. If you need to draw text, I recommend to examine articles from this documentation section: Drawing Text topicHope this helps. Edited by user Tuesday, December 15, 2009 10:40:34 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Member
Joined: 8/19/2006(UTC) Posts: 7
|
yes, I am doing it on this way now.
The problem is that it takes long time to finish one file. Because it takes steps like this:
1. Read records from database 2. creat blank JPG 3. from record 1-4(supose I want write 4 pictures at one row), get the URLs of those pictures. resize them one by one. 4. Put them on first row one by one 5. From record 1-4, write texts on row #2 6. Draw line 7.then go to 4-8 picture on next row cycling step#3 -#6
If you could embled this feature in this com by simple codes, it should be much more better.
Anyway, thanks for great help.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Stan,
Anyway, we would have to do the same inside, so it would not increase the speed. If the image you combine is big enough it cannot work fast anyway.
It would improve the performance if you stored resized version of images in database (prepared in the same time when they are submitted to database). This way you could avoid the slowest operation in the chain. But of course it will help only if the size of images on a big bitmap is fixed.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.