Recent

Author Topic: Creating thumbnails from photos of different file formats in ARM Linux?  (Read 6213 times)

aidv

  • Full Member
  • ***
  • Posts: 173
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.
« Last Edit: August 27, 2015, 01:16:06 pm by aidv »

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: Creating thumbnails from photos of different file formats in Linux?
« Reply #1 on: August 27, 2015, 07:25:01 am »
The page 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.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Creating thumbnails from photos of different file formats in Linux?
« Reply #2 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

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Creating thumbnails from photos of different file formats in ARM Linux?
« Reply #3 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
« Last Edit: August 27, 2015, 01:30:21 pm by aidv »

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Creating thumbnails from photos of different file formats in ARM Linux?
« Reply #4 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

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Creating thumbnails from photos of different file formats in ARM Linux?
« Reply #5 on: August 27, 2015, 01:56:31 pm »
Great!

GraphicsMagick then fits my needs.

Thanks guys!

chrnobel

  • Sr. Member
  • ****
  • Posts: 274
Re: Creating thumbnails from photos of different file formats in ARM Linux?
« Reply #6 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

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Creating thumbnails from photos of different file formats in ARM Linux?
« Reply #7 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?
« Last Edit: August 28, 2015, 12:41:58 am by aidv »

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 825
Re: Creating thumbnails from photos of different file formats in ARM Linux?
« Reply #8 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.
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Creating thumbnails from photos of different file formats in ARM Linux?
« Reply #9 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