Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8371] Saving SVG's web view to camera roll results in blank image

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-07-10T22:11:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsapi
ReporterQuoc Huy
AssigneeEric Merriman
Created2012-03-08T14:56:36.000+0000
Updated2017-07-10T22:11:54.000+0000

Description

Problem Description

In a webview, I'm loading jquery and some other plugins to handle SVG objects. The JS code then generate the resulting SVG content. Having not found a way to create a web view from a string of SVG content, I'm saving the content to a temporary folder and then open that file in a Ti.Filesystem.file object then send that object to webview.data, this is working and the web view does display the SVG content properly. Then, the user tries to do a webview.toImage() in order to get the png in the camera roll.

Actual results

The image is blank (white).

Expected results

getting the webview's content in the image.

Test Code

The bug now comes when I'm trying to save that web view to the camera roll:
var svgFileContent = svgFile.read();
					
var svgWebview = Ti.UI.createWebView({
    data: svgFileContent,
    size: {width: 600, height: 600}
});

Ti.Media.saveToPhotoGallery(svgWebview.toImage());

Comments

  1. Lee Morris 2017-07-10

    Closing ticket due to time passed and lack of progress for a number of years. Please open a new ticket if there are any problems.

JSON Source