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

Notification

Icon
Error

Options
Go to last post Go to first unread
erik  
#1 Posted : Thursday, July 21, 2005 5:05:00 PM(UTC)
erik

Rank: Member

Groups: Member
Joined: 7/29/2004(UTC)
Posts: 24

I'm going to make a swf-file from a jpg file. From an earlier discussion on the forum I found some code from you made for ASP. I have used exactly the same code in VB, but do not obtain the expected result:
Code:
Dim bm As New GraphicsMill.Bitmap
bm.LoadFromFile "Z:\nina\bannere\alto.jpg"
bm.ApplyInPlace = True
bm.Data.ApplyInPlace = True
bm.Data.Channels.Transparentize &HFFFFFFFF, 30
bm.FormatAutoSelect = False
bm.Formats.SelectCurrent "swf"
bm.Formats.SwfBackgroundColor = &HFF00FF00
bm.Formats.SwfCompressionType = 0
bm.SaveToFile "Z:\nina\bannere\alto.swf"
I have checked that there really is a white (#FFFFFF) background on this picture, but I dont get any kind of transparency in the swf-file. Any suggestions? Regards Erik

Edited by user Sunday, December 23, 2007 5:50:29 PM(UTC)  | Reason: Not specified

Fedor  
#2 Posted : Thursday, July 21, 2005 7:20:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,530

Thanks: 4 times
Was thanked: 53 time(s) in 52 post(s)
Hello Erik, I think the problem is in the following line of code:
Code:
bm.Formats.SwfCompressionType = 0 
As we have the following numeric values of compression type enumeration: SwfCompressionTypeJpeg = 0 - JPEG compression, SwfCompressionTypeLossless = 1 - lossless compression. In fact only Graphics Mill 3.x for .NET supports alpha channel with JPEG compression in SWF, at that time as Graphis Mill 2.1 for ActiveX supports it with lossless compression only. So way you should use:
Code:
bm.Formats.SwfCompressionType = 1 

Edited by user Sunday, December 23, 2007 5:50:55 PM(UTC)  | Reason: Not specified

Best regards, Fedor Skvortsov
erik  
#3 Posted : Thursday, July 21, 2005 9:56:00 PM(UTC)
erik

Rank: Member

Groups: Member
Joined: 7/29/2004(UTC)
Posts: 24

I have just found the same solution and now its working. The penalty is that the swf-file (with my testfile) goes from 2 Kb to 10 Kb. Do you think that there will be an upgrade to the ActiveX component? Regards Erik
Fedor  
#4 Posted : Friday, July 22, 2005 12:29:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,530

Thanks: 4 times
Was thanked: 53 time(s) in 52 post(s)
I have just found the same solution and now its working. The penalty is that the swf-file (with my testfile) goes from 2 Kb to 10 Kb. That's why we have implemented JPEG with alpha channel support in .NET version . Do you think that there will be an upgrade to the ActiveX component? We schedule to release update during the Fall, but if you need it urgently please submit case.

Edited by user Friday, May 23, 2008 2:47:40 PM(UTC)  | Reason: Not specified

Best regards, Fedor Skvortsov
erik  
#5 Posted : Saturday, July 23, 2005 8:40:00 AM(UTC)
erik

Rank: Member

Groups: Member
Joined: 7/29/2004(UTC)
Posts: 24

Its OK for me - if I can be sure that its going to be implemented with next update. Regards
Users browsing this topic
Similar Topics
Convert to grayscale and transparency (Discussions – Graphics Mill)
by ot2 3/5/2015 2:57:27 AM(UTC)
Resize a original png graphic with transparency! (Discussions – ActiveX/Java Uploader)
by Larry 2/20/2010 2:38:04 PM(UTC)
Losing transparency when saving TIFs (Discussions – Graphics Mill)
by jprekopa 4/20/2009 11:39:01 PM(UTC)
Transparency Questions (Discussions – Graphics Mill)
by tneagle99 2/15/2007 9:54:39 AM(UTC)
Transparency (Discussions – Graphics Mill)
by vandna 1/8/2007 4:36:43 PM(UTC)
Saving CMYK Image with transparency (Discussions – Graphics Mill)
by camelord 6/12/2006 7:54:20 PM(UTC)
Problem with background transparency colour. (Other Products)
by Crimblepud 6/8/2006 11:41:39 PM(UTC)
Keeping transparency of a clipart whn being drag & drop from our library to COREL Designer & (Discussions – Graphics Mill)
by jcavard 12/5/2005 3:48:17 AM(UTC)
>>Color Overlay Effetct With Transparency (Other Products)
by nishanthe 10/7/2005 8:41:32 PM(UTC)
Transparency - difficult to get it working (Other Products)
by erik 5/30/2005 12:18:00 AM(UTC)
Transparency after Skew transform (Other Products)
by McKenna 8/10/2004 12:38:00 PM(UTC)
PRB: PNG files with transparency are drawn incorrectly in IE (FAQ - Frequently Asked Questions)
by Fedor 9/28/2002 10:14:00 PM(UTC)
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.