Rank: Advanced Member
Groups: Guest
Joined: 3/3/2008(UTC) Posts: 185
Thanks: 8 times
|
Hi,
May I know how can I apply shadow to the bitmap without prompt user on the transform property windows? Means apply shadow to bitmap by using preset value programmatically.
Please advice.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/3/2008(UTC) Posts: 185
Thanks: 8 times
|
Hi,
I found this in the documentation... image.Transforms.Shadow(Aurigma.GraphicsMill.RgbColor.Black, 4, 4, 10, True)
It manage to do what we mentioned, but, we found that, it will actually make the photo "bigger". Just wondering is there anyway for us to make the photo "same size" even after the shadow? Means it will actually shrink the photo and after adding the photo, then it will be the same view size (include the shadow) as the original image.
The reason we doing is if because we are drawing the bitmap as imageVobject. Each time we replace a new photo and apply shadow, it will actually increase the size of vobject, so, the more iteration we replace the vobject, the bigger size it will go....
Please advice.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hello,
Try to pass False within last parameter. In that case image dimensions will be the same. However this way will give you acceptable output only if your image has transparent background and some opaque parts on it. On fully opaque images (like photos) the dropped shadow will be cropped.
To prevent this you may add transparent margins around images before creating ImageVObject around it. In such case this margins will reserve place for shadow effect and image will look better.
Best regards, Alex Kon |
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/3/2008(UTC) Posts: 185
Thanks: 8 times
|
Hi,
Thanks for the reply. We would prefer to go with the 2nd method. But, how we know how much we need to actually "transparent the margins around images" ? Is there any formula that we can calculate to ensure we get the same size as those original one after adding shadow?
Please advice.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hello,
result_width = source_width + shadow_offset_x + 2 * shadow_radius, result_height = source_height + shadow_offset_y + 2 * shadow_radius |
|
|
|
|
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.