Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize canvas with filtered images to SVG broken #3298

Closed
ats3v opened this issue Sep 30, 2016 · 5 comments · Fixed by #3310
Closed

Serialize canvas with filtered images to SVG broken #3298

ats3v opened this issue Sep 30, 2016 · 5 comments · Fixed by #3310

Comments

@ats3v
Copy link

ats3v commented Sep 30, 2016

Version

1.6.4

Test Case

http://jsfiddle.net/Da7SP/188/

Steps to reproduce

Run the fiddle and open the console. You will see the output of the toSVG canvas function.
In the test case there is one image loaded from URL with filter applied. Then toSVG method is called and logged in the console.

Expected Behavior

When there are images with filters applied, toSVG canvas function should serialize their source and output it in xlink:href attribute as data (base64).

Actual Behavior

With latest release the xlink:href attribute is set to their initial URL.

@asturur
Copy link
Member

asturur commented Oct 1, 2016

i close this issue as duplicate of:
#1577
there was some code somewhere to have the image data url in the exported svg.
We could merge that if the image has filters. Just the svg would be very big.

@asturur asturur closed this as completed Oct 1, 2016
@ats3v
Copy link
Author

ats3v commented Oct 1, 2016

This is NOT the same problem (dated 2 years ago). This bug is a regression in 1.6.4 for something that worked just fine before that. The SVG used to be "very big" but that wasn't an issue, for us at least. The main thing was it was working. We don't need additional information about the filters applied (like the person in #1577 wanted), we need the image with applied filters in it, sent as data.
If there is an option to turn the old behaviour on, please share how to set it up. Otherwise this should be considered as a regression.

@asturur
Copy link
Member

asturur commented Oct 2, 2016

yes i realized i was wrong. i think somehow i m pulling src from originalelement and not from element. probably when i "fixed" getSrc function.
to object we need originalElement and toSvg element. gonna check it.

@asturur asturur mentioned this issue Oct 2, 2016
@asturur
Copy link
Member

asturur commented Oct 2, 2016

give a look at PR should solve the issue. writing tests and merging today.

@ats3v
Copy link
Author

ats3v commented Oct 4, 2016

Yes, it solves the issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants