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
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 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
|
|
|
|
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
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 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
|
|
|
|
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
|
|
|
|
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.