[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - Using a graphics library - GD Library or ImageMagick

Using a graphics library - GD Library or ImageMagick

Q&A's, tips, howto's

Using a graphics library - GD Library or ImageMagick

Postby hilti » Tue Jul 05, 2011 5:10 am

Hi Guys!

I'm currently working part-time on a visual search project written in newLISP. Now it's time to scale some images.

Does anyone have experiences in accessing GDLib or ImageMagick?
A full example including picture upload, scaling and saving to disk would be great. :-)

Thanks so much!
Hilti
--()o Dragonfly web framework for newLISP
http://dragonfly.apptruck.de
hilti
 
Posts: 140
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Re: Using a graphics library - GD Library or ImageMagick

Postby TedWalther » Tue Jul 05, 2011 4:49 pm

Is Dragonfly the newLISP equivalent of Ruby on Rails? Is your template system based on HAML/YAML?
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence. Nine months later, they left with a baby named newLISP. The women of the ivory towers wept and wailed. "Abomination!" they cried.
TedWalther
 
Posts: 605
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC

Re: Using a graphics library - GD Library or ImageMagick

Postby hilti » Tue Jul 05, 2011 6:48 pm

--()o Dragonfly web framework for newLISP
http://dragonfly.apptruck.de
hilti
 
Posts: 140
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Re: Using a graphics library - GD Library or ImageMagick

Postby TedWalther » Wed Jul 06, 2011 6:25 am

To answer your original question, so far I've used imagemagic using (exec) to use the commandline utilities. I never got much traction with the C libraries themselves, so haven't made any newlisp modules for them. I agree, it would be very nice to have such modules.
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence. Nine months later, they left with a baby named newLISP. The women of the ivory towers wept and wailed. "Abomination!" they cried.
TedWalther
 
Posts: 605
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC

Re: Using a graphics library - GD Library or ImageMagick

Postby TedWalther » Wed Jul 06, 2011 6:28 am

Instead of HAML, what if we used HNML? It is a sort of pun; instead of being pronounced "hamel", it would be "hanimal". It would execute newlisp instead of ruby code. But also, instead of python indentation, it would use sexps. Or something sexp-ish.

And I have to know; I have seen some similar concepts in dragonfly and RoR. Was dragonfly inspired a lot by Ruby on Rails, or just a little bit?
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence. Nine months later, they left with a baby named newLISP. The women of the ivory towers wept and wailed. "Abomination!" they cried.
TedWalther
 
Posts: 605
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC

Re: Using a graphics library - GD Library or ImageMagick

Postby hilti » Wed Jul 06, 2011 2:49 pm

--()o Dragonfly web framework for newLISP
http://dragonfly.apptruck.de
hilti
 
Posts: 140
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Re: Using a graphics library - GD Library or ImageMagick

Postby hilti » Wed Jul 06, 2011 2:53 pm

--()o Dragonfly web framework for newLISP
http://dragonfly.apptruck.de
hilti
 
Posts: 140
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Re: Using a graphics library - GD Library or ImageMagick

Postby Lutz » Wed Jul 06, 2011 9:19 pm

There is a chapter about importing C-library functions in the CodePatterns document:

http://www.newlisp.org/downloads/CodePa ... tml#toc-23

And shorter documentation in the Users Manual and Reference:

http://www.newlisp.org/downloads/newlis ... _libraries

... each of the functions in that list says something which could be important when importing C-library functions.

There are also several standard modules using C-libraries:

http://www.newlisp.org/code/modules/crypto.lsp.html

http://www.newlisp.org/code/modules/gmp.lsp.html

http://www.newlisp.org/code/modules/mysql.lsp.html

http://www.newlisp.org/code/modules/odbc.lsp.html

http://www.newlisp.org/code/modules/postgres.lsp.html

http://www.newlisp.org/code/modules/sqlite3.lsp.html

http://www.newlisp.org/code/modules/unix.lsp.html

http://www.newlisp.org/code/modules/zlib.lsp.html

... reading and understanding relevant code is always a big help.


An OpenGL example (has callbacks!)

http://www.newlisp.org/syntax.cgi?downl ... mo-lsp.txt

For ImageMagic and GD you would need the developer docs for C-programmers, to see how functions are called, what data types they take, etc.

You definitely need to know how to program in C or get somebody to help you, who knows.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 1 guest

cron