SVG and PNG Clip Art Stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
SVG and PNG Clip Art Stack
http://www.openclipart.org using their API , available here: https://openclipart.org/developers
It also uses Bob Hall's FastJSON library which is included as a sub-stack. Available here:
https://github.com/bhall2001/fastjson/b ... astjson.lc
It allows you to search a library of almost 100,000 images and download up to 10 images at a time in both SVG and high quality PNG formats.
Most of the program is in the card script, I'd love to hear what you think.
https://www.dropbox.com/sh/lzsun4gg4lgz ... HwfDa?dl=0
ClipArtGuy
I have written this small stack as a front-end of sorts to It also uses Bob Hall's FastJSON library which is included as a sub-stack. Available here:
https://github.com/bhall2001/fastjson/b ... astjson.lc
It allows you to search a library of almost 100,000 images and download up to 10 images at a time in both SVG and high quality PNG formats.
Most of the program is in the card script, I'd love to hear what you think.
https://www.dropbox.com/sh/lzsun4gg4lgz ... HwfDa?dl=0
ClipArtGuy
Re: SVG and PNG Clip Art Stack
Very cool, thank you very much for sharing!
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: SVG and PNG Clip Art Stack
Thanks to the new JSONimport() function, this stack no longer requires a 3rd party JSON library. It also seems to be a bit faster as well.
https://www.dropbox.com/sh/76z1nwrdl8fo ... O4Xka?dl=0
https://www.dropbox.com/sh/76z1nwrdl8fo ... O4Xka?dl=0
Re: SVG and PNG Clip Art Stack
Wonderful and really useful stack!
Many, many thanks for sharing
From your stack, How could we read or
search very specific data from svg source
code before downloading a file?
For example, Does exist some way to read
the svg source code to learn this information?
I am collecting svg files created using different apps,
(besides Inkscape and Ilustrator) and your stack
could help me in this task.
Thanks in advance!
Alejandro
Many, many thanks for sharing
From your stack, How could we read or
search very specific data from svg source
code before downloading a file?
For example, Does exist some way to read
the svg source code to learn this information?
I am collecting svg files created using different apps,
(besides Inkscape and Ilustrator) and your stack
could help me in this task.
Thanks in advance!
Alejandro
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: SVG and PNG Clip Art Stack
Hi ClipArtGuy,
your stack is a jewel, both from scripts and the available actions. Thanks!
You should think about changing your nickname to ClipArtKing.
your stack is a jewel, both from scripts and the available actions. Thanks!
You should think about changing your nickname to ClipArtKing.
- Attachments
-
- LG-Crown13.png (36.24 KiB) Viewed 12001 times
shiftLock happens
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: SVG and PNG Clip Art Stack
The large preview area to left has a custom property called cSVGdownload that contains the URL of the SVG being previewed. (Actually all the gallery images have this property as well) So a simple way to see the text of the SVG would be as easy as:capellan wrote:Wonderful and really useful stack!
Many, many thanks for sharing
From your stack, How could we read or
search very specific data from svg source
code before downloading a file?
For example, Does exist some way to read
the svg source code to learn this information?
I am collecting svg files created using different apps,
(besides Inkscape and Ilustrator) and your stack
could help me in this task.
Code: Select all
get URL (the cSVGdownload of img "viewer")
answer it
Thanks and Thank you for all great stacks for the Raspberry Pi![-hh] wrote:Hi ClipArtGuy,
your stack is a jewel, both from scripts and the available actions. Thanks!
You should think about changing your nickname to ClipArtKing.
Re: SVG and PNG Clip Art Stack
Great! After, I finish some pending work, I will add a small button with your code in the stack GUI.
Last time I checked, whole clipart collection from Openclipart is more than 10 Gb.
Hopefully, in a near future LiveCode will import SVG files as an image with transparency (like PNGs).
Have a nice week!
Alejandro
Last time I checked, whole clipart collection from Openclipart is more than 10 Gb.
Hopefully, in a near future LiveCode will import SVG files as an image with transparency (like PNGs).
Have a nice week!
Alejandro
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: SVG and PNG Clip Art Stack
I have added a "view SRC" button underneath the preview area. Clicking this button will get the SVG data and open it in a resizable substack called "sourceviewer" with an editable text field. The script is right in the button.capellan wrote:Great! After, I finish some pending work, I will add a small button with your code in the stack GUI.
Last time I checked, whole clipart collection from Openclipart is more than 10 Gb.
Hopefully, in a near future LiveCode will import SVG files as an image with transparency (like PNGs).
Have a nice week!
Alejandro
https://www.dropbox.com/sh/eo7k7g4jvdwp ... Bgypa?dl=0
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: SVG and PNG Clip Art Stack
I just added a "Save SVG" button to the source viewer stack, so now you can edit the source and then save as SVG if need be. It's the latest version in this dropbox folder (1.3 as of this writing). I will continue to push updated versions to this folder.
https://www.dropbox.com/sh/lzsun4gg4lgz ... HwfDa?dl=0
https://www.dropbox.com/sh/lzsun4gg4lgz ... HwfDa?dl=0
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: SVG and PNG Clip Art Stack
Hi "ClipArtGuy",
your excellent stack is soon getting lost in this big subforum.
TMHO, you should think about uploading it to revOnline (="Sample Stacks" from the revMenuBar).
Hermann
p.s. Alejandro, if you read this. The same is true for the great SVG stacks you created!
your excellent stack is soon getting lost in this big subforum.
TMHO, you should think about uploading it to revOnline (="Sample Stacks" from the revMenuBar).
Hermann
p.s. Alejandro, if you read this. The same is true for the great SVG stacks you created!
shiftLock happens
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: SVG and PNG Clip Art Stack
Thanks again Hermann! It's definitely something I plan on doing, there are a few more things that I'd like to work on when I get a chance before doing so, hopefully soon.[-hh] wrote:Hi "ClipArtGuy",
your excellent stack is soon getting lost in this big subforum.
TMHO, you should think about uploading it to revOnline (="Sample Stacks" from the revMenuBar).
Hermann
p.s. Alejandro, if you read this. The same is true for the great SVG stacks you created!
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: SVG and PNG Clip Art Stack
Hi "ClipArtGuy",
your stack works *perfectly* in LC 8 but has several problems in LC 9.0.0-dp2 probably connected to networking only. Networking is _very_ slow, startup and "View SRC" need a full minute. Do you see why? You could then think about reporting this to QCC.
Hermann
your stack works *perfectly* in LC 8 but has several problems in LC 9.0.0-dp2 probably connected to networking only. Networking is _very_ slow, startup and "View SRC" need a full minute. Do you see why? You could then think about reporting this to QCC.
Hermann
shiftLock happens
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: SVG and PNG Clip Art Stack
I wonder why, when I downloaded the downloader stack 1.3 onto my Mac Livecode told me it was not a stack?
Would be grateful if you could upload it in a zip file.
Would be grateful if you could upload it in a zip file.
Re: SVG and PNG Clip Art Stack
Just downloaded the stack from his Dropbox and did not have any problems!?