Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Script to resize JPEG files  (Read 2087 times)

0 Members and 1 Guest are viewing this topic.

Salmon Trout



    Genius

    Thanked: 915
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Other
Re: Script to resize JPEG files
« Reply #15 on: January 01, 2018, 05:40:16 AM »
Also, if we turn out to have a professional or pro-sumer's archive of big RAW images, something doesn't add up, because these people tend to be very conscious of storage backup and archiving issues, often choosing a large external hard drive or NAS for this purpose. So where is this? Of course you do get "gadget guy" type people who buy a "bridge" camera or DSLR and fill up their PC's internal hard drive with huge images they don't need.


Salmon Trout



    Genius

    Thanked: 915
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Other
Re: Script to resize JPEG files
« Reply #16 on: January 01, 2018, 08:16:49 AM »
The photos are tabout 2 to 7 megabytes each. How big a TV does it take to show a photo that is over 5000 pixels wide?
These aren't "huge"  digital camera images. The TV will scale so you can see the whole picture.

Salmon Trout



    Genius

    Thanked: 915
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Other
Re: Script to resize JPEG files
« Reply #17 on: January 01, 2018, 10:22:59 AM »
Quote from: Geek-9pm
Have can anybody accumulate over 200 GB of JPEG photos in seven years?

Quote from: Geek-9pm
The photos are tabout 2 to 7 megabytes each

That's between 30,000 and 100,000 images. Some slide show.

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 961
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows XP
Re: Script to resize JPEG files
« Reply #18 on: January 02, 2018, 12:09:48 AM »
That's between 30,000 and 100,000 images. Some slide show.
I think the slide show is off. Unless it becomes a movie.   :P

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 961
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows XP
Re: Script to resize JPEG files
« Reply #19 on: January 09, 2018, 09:31:53 PM »
Pardon me.  :-[ I am stuck on this. Can't sleep until I know.  :'(
But I would like to know how to run any pho editor from command line. Some research shows GIMP is what I should try. But I have a hard time with the massive documentation.:o

I just want to know how to run it from the command prompt. Or else call it from Vb-script or some kind of script.

Anybody?  Please? 

Salmon Trout



    Genius

    Thanked: 915
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Other
Re: Script to resize JPEG files
« Reply #20 on: January 10, 2018, 12:24:50 AM »
What did you want the photo editing software to do? Just start, or perform some kind of scripted operation?

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 961
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows XP
Re: Script to resize JPEG files
« Reply #21 on: January 10, 2018, 02:29:00 PM »
My objective is to made a batch file that would alter all the images found in a directory. Conversion from one format to another could be helpful. Orr seduction of detail or reduced color depth. Right now I am looking at photos  I have collected.

I would hope that a pho editor would his kind of syntax on the command line:
photo-editor <input file> <profile> <output file>
The profile. or template,  would have the parameters and a process to be performed. Such as convert to another format, or reduce the number of vertical or horizontal pixels.
GIMP is said to be able to handle calls coming from  C++ or python. That would imply something like a command line interface. -Right?

I did find a command line information for Format Factory, but I never got it to work. So I gave up.

Any help or suggestions are appreciated.   :)



BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1074
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 8
Re: Script to resize JPEG files
« Reply #22 on: January 10, 2018, 02:56:49 PM »
seduction of detail

Seduction of Detail is provided by a Frisky Filter...

Gimp's batch processing is done through Lisp. Or at least, it sure looks like Lisp.
I was trying to dereference Null Pointers before it was cool.

Salmon Trout



    Genius

    Thanked: 915
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Other
Re: Script to resize JPEG files
« Reply #23 on: January 10, 2018, 03:47:19 PM »
I would hope that a pho editor would his kind of syntax on the command line:
photo-editor <input file> <profile> <output file>
The profile. or template,  would have the parameters and a process to be performed. Such as convert to another format, or reduce the number of vertical or horizontal pixels.
I said it before, and I'll say it again: Image Magick (spelled thus) It has command-line options and a scripting language,

https://www.imagemagick.org/script/index.php

Code: [Select]
magick convert rose.jpg rose.png
Code: [Select]
magick convert rose.jpg -resize 50% rose.png
Code: [Select]
magick convert -size 320x85 canvas:none -font Bookman-DemiItalic -pointsize 72 \
  -draw "text 25,60 \'Magick\'" -channel RGBA -blur 0x6 -fill darkred -stroke magenta \
  -draw "text 20,55 \'Magick\'" fuzzy-magick.png

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 961
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows XP
Re: Script to resize JPEG files
« Reply #24 on: January 10, 2018, 06:49:08 PM »
Thank you, Salmon Trout

No I have some reading to do and try and grasp how that works. It seems that either GIMP or Image Magick will do the work.

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 961
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows XP
Re: Script to resize JPEG files
« Reply #25 on: January 14, 2018, 10:24:59 PM »
Well, it was just too much for me. I don't understand it.
So, I did some looking around and found...
Factory Image Converter.
The command line syntax was so simple that even I could understand it. After about three hours. Basically it is just source,  target, options. Works great!  :)