I would like to know if there is a way use the built in export/getSVG function in Highstock to save the exported PNG to a variable in the background instead of prompting the user to download the file.
The thought is for a user to be able to click a button which will export each snapshot to a variable in the background. When done scrolling through the entire chart a subsequent button would create a document containing all the PNG images for a singe download. We can develop everything but the hangup is on saving the PNG image to a variable. We have been able to assign the SVG string to an array we maintain but due to size this would not be the best option for use.
Are there any ways to do this?
Something like this is possible to achieve, see FAQ
However, there is also one more option - get SVG, and use canvg to render into canvas and then to PNG file, as you need.
Related
I have an SVG graphic that I want to put some text on from my PHP variables. The graphic was generated in Illustrator and resizes in my web page to 100% width. Here is a representation of it:
How could this be done for the 8 text items? Does something special need to be done in Illustrator, like creating an anchor point for the text? How do I update the text item? I've done research but haven't been able to find a similar situation.
Thankful for any information that could help me narrow down my search.
Being someone who has never worked with files of .SVG file type before, this was a misunderstanding.
If you design a graphic in Adobe Illustrator, save it as an SVG and edit it with your favorite text editor, you will be able to see the SVG mark-up. It all makes sense now, and here you will be able to change the text at the code-level.
For my application, I saved the SVG as a PHP file and did an include on it, while changing the raw text to PHP variables in said file. This allowed me to pass my dynamic text as variables to the graphic.
I am new to sketch. After designed an icon in sketch, I want to export it to PNG. The icon is drawn with multiple path and grouped together. But when I export it, the exported image has drop shadow in it. I don't want the shadow. Is there anyway to get rid of it?
You can try icongroup Layer>Flatten Selection to Bitmap. And then Make Exportable.
Currently i am working on excel vba based printing program.I need only certain cells(not areas) to be a print object.I know excel does not have such a function.So i thought using a png image that has transparent background.My reason to do this making active x image non printable.Active X image does not allow me to use png files.
Do i need special codes to allow me to use png images?
Not sure I got it right (sorry) but why don't you just insert the png image through the Insert>Image? and then uncheck its "Print object" property?
I need to be able to take some variable text entered by the user and merge it with a "template" image to create a single image as PNG (or other). Can this be done with Livecode?
There are several ways to do this. One way is to create a transparent field on top (or in front) of an image and group them. Give this group the name "Caption". Then use this script:
export snapshot from group "Caption" to myPictureData as PNG
Now you can create a new image and set the text of the image to myPictureData or save myPictureData to a file.
If all you need is an image in your stack, the import snapshot command is a great option:
import snapshot from group "imgAndFld" with effects
The optional 'with effects' clause will preserve any graphic effects you have applied to the imported objects, important if you want your text to have a drop shadow or glow effect, for example.
I am having trouble changing the background color of Dialog from white to any color.
I have tried the following code snippets but to no use.
dialog.getDialogStyle().setBgColor(0xffce78, true);
dialog.getUnselectedStyle().setBgImage(Image.createImage("/main_bg.png"));
dialog.getPressedStyle().setBgImage(Image.createImage("/main_bg.png"));
dialog.getSelectedStyle().setBgImage(Image.createImage("/main_bg.png"));
You need to use the dialog style getDialogStyle().
Regardless your code creates 3 separate yet identical images which is REALLY BAD! You are loading the same image 3 times into memory!
Is you image in the root directory? You should use the full path from the src folder, I mean, if your image is in the "images" package, you should put this path "/images/main_bg.png". If it is in the default package...."main_bg.png"