Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
ChingYen  
#1 Posted : Thursday, August 6, 2009 11:40:26 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
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.
ChingYen  
#2 Posted : Friday, August 7, 2009 5:10:20 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
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.
Alex Kon  
#3 Posted : Friday, August 7, 2009 8:21:34 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups:
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
ChingYen  
#4 Posted : Sunday, August 9, 2009 6:55:08 AM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
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.
Alex Kon  
#5 Posted : Monday, August 10, 2009 2:23:13 AM(UTC)
Alex Kon

Rank: Advanced Member

Groups:
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
Users browsing this topic
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.