LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2018, 01:18 PM   #1
shivam singh
LQ Newbie
 
Registered: Jan 2018
Posts: 6

Rep: Reputation: Disabled
Question Shell Scripting


A shell script which takes an image as input and converts that into a vector of the same size.
 
Old 01-26-2018, 01:21 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You're looking for a rasterizer of some sort, see for example
http://potrace.sourceforge.net/samples.html
 
Old 01-26-2018, 01:26 PM   #3
shivam singh
LQ Newbie
 
Registered: Jan 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
You're looking for a rasterizer of some sort, see for example
http://potrace.sourceforge.net/samples.html

I need code for reference
 
Old 01-26-2018, 02:12 PM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,103
Blog Entries: 6

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Imagemagick will do that I think if this is what you want
Code:
convert file.jpg file.svg
Code:
convert  -list delegate | grep -i svg
https://www.vectorizer.io/
http://potrace.sourceforge.net/
https://inkscape.org/en/

Quote:
I need code for reference
Then write some.
 
Old 01-27-2018, 02:44 AM   #5
shivam singh
LQ Newbie
 
Registered: Jan 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by teckk View Post
Imagemagick will do that I think if this is what you want
Code:
convert file.jpg file.svg
Code:
convert  -list delegate | grep -i svg
https://www.vectorizer.io/
http://potrace.sourceforge.net/
https://inkscape.org/en/


Then write some.
I am using convert file.jpg file.svg
but getting invalid parameter error
 
Old 01-27-2018, 04:23 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by shivam singh View Post
I am using convert file.jpg file.svg
but getting invalid parameter error
https://www.imagemagick.org/discourse-server/search.php
https://imagemagick.org/script/command-line-options.php
 
Old 01-27-2018, 08:56 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by shivam singh View Post
I am using convert file.jpg file.svg but getting invalid parameter error
So read the man page or the documentation. And you ALSO need to read the "Question Guidelines" and "How to ask a smart question" links in my posting signature, along with the LQ Rules.

We WILL NOT write your scripts or do your homework for you. YOU, personally, are expected to do some research on your own, and show your own efforts, before posting. You now have four threads open with nothing but a homework question, and no efforts shown.
 
Old 01-28-2018, 05:06 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,622

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
the imagemagick convert will NOT make a svg
it will put a svg wrapper around a jpg but it will NOT be a vector image

have a look at using "Trace Bitmap"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Shell Scripting Part 3: Decision Control Structures in Shell Scripts LXer Syndicated Linux News 0 05-05-2015 10:01 PM
LXer: Shell Scripting Part 2: Accepting Inputs and Performing Shell Arithmetic LXer Syndicated Linux News 0 04-30-2015 07:10 AM
LXer: Shell Scripting Part I: Getting started with bash scripting LXer Syndicated Linux News 0 04-29-2015 08:03 AM
win32,shell code,shell programming,shell scripting? mr.cracker Linux - Newbie 4 07-12-2013 11:20 PM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration