List of issuesList of issues

#1320 shape transparency not preserved on export-reimport
Author: user Owyn
Date created:
Type: feature
Visibility: Everybody
Assigned to:
State: new Help

> What steps will reproduce the problem? 1. export shape (SVG) 2. import exact same shape back again > What is the expected output? What do you see instead? transparency should be preserved. but now transparent parts are now black and not transparent > What version of the product are you using? Is it "nightly build"? Which operating system do you have? Latest, Win 10 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you.
DownloadbossBAR.swf (303 KiB)Download192.svg (307 B)
developer
JPEXS: Do you have any idea why is this (attached swf) square red? Is red a default color in flash?
user
Nope, no idea, but it's not red in the game, but transparent, and If I export\reimport it - it becomes black instead of red, and totally not transparent but just solid black
developer
Please try thge latest nightly. Now it exports a red square, and imports it back. It is not possible to export the transparent thing, because that image (characterid=191) probably comes from an external souce, which is not available during the export. So if you want to import it as transparent, edit the SVG before importing it.
developer
I convert this to a feature request, because this is not a bug anymore. FFDec should add some kind of private data to the SVG which shows FFDec how to import the SVG back to the SWF. In your case the (relevant part of) the SVG is: <g transform="matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)"> <path d="M0.0 0.0 L32.0 0.0 32.0 32.0 0.0 32.0 0.0 0.0" fill="#ff0000"/> </g> But it should be: <g transform="matrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0)"> <path d="M0.0 0.0 L32.0 0.0 32.0 32.0 0.0 32.0 0.0 0.0" ffdec:fill="{somehow serialize here the fillstyle}"/> </g> And of course add the namespace declaration: xmlns:ffdec="/flash" Custom attributes in a custom namespaces are supported by SVG: https://www.w3.org/TR/SVG/extend.html#ForeignNamespaces So the result is a valid SVG. But maybe this information will be lost if you edit the SVG file with a 3rd party SVG editor.
Type: bug→feature
 
Google Translate: Translate to Czech Translate to Slovak Translate to Russian Translate to Hungarian Translate to Swedish Translate to French Translate to German Translate to Spanish Translate to Italian
Change style: oceanic classic