Lazarus

Programming => Graphics and Multimedia => Graphics => Topic started by: aidv on August 27, 2015, 03:44:50 am

Title: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: aidv on August 27, 2015, 03:44:50 am
Hi!

I need to create thumbnails from photos of different file formats.

JPEG, BMP and other know formats are given.

So my question is: which libraries for Lazarus are available that can open different file-formats and which library supports the most amount of formats?

EDIT:
I need the library to be compatible with ARM Linux.

Alternatively;
Is there any command line tool for ARM Linux which could possibly do what I need?
I could use the TProcess approach as well, it works for well for me to do so and fits perfectly within my frame of approaching my requirements.
Title: Re: Creating thumbnails from photos of different file formats in Linux?
Post by: taazz on August 27, 2015, 07:25:01 am
The page http://wiki.lazarus.freepascal.org/Graphics_libraries (http://wiki.lazarus.freepascal.org/Graphics_libraries) has a list of various graphics libraries one of them is vampire image library which has support for a lot of file formats and I think but not very sure, that fpc has a package to link against image magic library which has its own support as well.
Title: Re: Creating thumbnails from photos of different file formats in Linux?
Post by: mse on August 27, 2015, 07:51:23 am
GraphicsMagick:
http://www.graphicsmagick.org/

It is very fast on creating thumbnails from big pictures and fully integrated into MSEgui pixmap handling. Please add msemagickstream to uses of MSEgui applications and call msemagickstream.registerformats() in order to register the wanted image formats. The library interface msegraphicsmagick.pas unit is here:
https://gitlab.com/mseide-msegui/mseide-msegui/tree/master/lib/common/image
Title: Re: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: aidv on August 27, 2015, 01:13:39 pm
taazz and mse, thank you very much. unfortunately I must correct myself and edit the title of my thread.

I noticed that for example Vampire library only supports linux X86/AMD64, I need a library which is compatible for ARM Linux.

Sorry for being unclear.

EDIT:
Is GraphicsMagick ARM Linux compatible? I can't seem to find any information about it?
It has a command which is exactly what I need.
The command is
Code: [Select]
gm mogrify -output-directory .thumbs -resize 320x200 *.jpg
Title: Re: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: mse on August 27, 2015, 01:50:00 pm
Is GraphicsMagick ARM Linux compatible? I can't seem to find any information about it?
Seems so:
https://packages.debian.org/sid/graphicsmagick
Title: Re: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: aidv on August 27, 2015, 01:56:31 pm
Great!

GraphicsMagick then fits my needs.

Thanks guys!
Title: Re: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: chrnobel on August 27, 2015, 11:33:58 pm
Alternatively;
Is there any command line tool for ARM Linux which could possibly do what I need?
I could use the TProcess approach as well, it works for well for me to do so and fits perfectly within my frame of approaching my requirements.
You could use ImageMagick, it works quite ok on Raspberry Pi, so I would guess it also works with other ARM's
Title: Re: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: aidv on August 28, 2015, 12:38:16 am
Alternatively;
Is there any command line tool for ARM Linux which could possibly do what I need?
I could use the TProcess approach as well, it works for well for me to do so and fits perfectly within my frame of approaching my requirements.
You could use ImageMagick, it works quite ok on Raspberry Pi, so I would guess it also works with other ARM's

I am looking at GraphicsMagick and it seems interesting and seems to a have a different license than ImageMagick.

I have two new questions:

1. How do I download, install and use GraphicsMagick on Raspbian and then utilize it from my lazarus app? Do I utilize it from the terminal with RunCommand?

2. What license does GraphicsMagick have? I am working on a commercial product so I need to know the license in order to not potentially get sued in the future and cause harm to my company.

EDIT:
I found on Google that there is something called PascalMagick, which uses ImageMagick.

Is there a similar thing for GraphicsMagick?
Title: Re: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: Jurassic Pork on August 28, 2015, 01:29:41 am
hello,
What is the problem with pascalMagick - ImageMagick License ?

Quote
Before we get to the text of the license, lets just review what the license says in simple terms:
It allows you to:
freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes;
use ImageMagick software in packages or distributions that you create;
link against a library under a different license;
link code under a different license against a library under this license;
merge code into a work under a different license;
extend patent grants to any code using code under this license;
and extend patent protection.
Title: Re: Creating thumbnails from photos of different file formats in ARM Linux?
Post by: aidv on August 28, 2015, 01:34:01 am
hello,
What is the problem with pascalMagick - ImageMagick License ?

Seems like there's nothing wrong at all. Thanks!

So my counter-question is now: What is the difference between ImageMagick and GraphicsMagick?

Is there any performance difference?

Like I said before; I just need to create thumbnails from images and I'd like to support as many file-formats as possible.
TinyPortal © 2005-2018