Picture Conversion

Features wanted...
Post Reply
aurumdigitus
Posts: 1013
Joined: 30 May 2008 21:02
Location: Lake Erie

Picture Conversion

Post by aurumdigitus » 17 May 2019 20:38

This may be pushing the envelope of what a File Manager can or should do. However, since XY how has so many features pertaining to graphics how about one more?

In particular a way to convert PNG files to JPG. Note this a very specific conversion and not a request to convert anything to everything. 8)

RalphM
Posts: 1248
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Picture Conversion

Post by RalphM » 18 May 2019 07:16

What's wrong with using one of the command line versions of tools like Irfanview or ImageMagick and write a one-liner that does this trick?
While your wish is very specific and might be simple to accomplish, I'm sure there are hundreds more out there that would be just as legitimate, don't you think?
Ralph :-)
(OS: W10 1809 Home x64 - XY: Current beta)

aurumdigitus
Posts: 1013
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: Picture Conversion

Post by aurumdigitus » 20 May 2019 15:38

@ RalphM - Thank you for reading and taking the time to respond.
there are hundreds more out there that would be just as legitimate, don't you think?
Agreed; your point cannot be disputed.
What's wrong with using one of the command line versions of tools like Irfanview or ImageMagick and write a one-liner that does this trick?
As you may have gleaned by reading my thousand posts over a decade Scripting is a gift not bestowed upon me. :cry:

highend
Posts: 8157
Joined: 06 Feb 2011 00:33

Re: Picture Conversion

Post by highend » 20 May 2019 16:10

Code: Select all

    $magick = "<path to>\ImageMagick\magick.exe";
    foreach($item, <get SelectedItemsPathNames |>, , "e") {
        if (exists($item) == 2) { continue; }
        runret("""$magick"" mogrify -format jpg ""$item""");
        status "Processing: " . gpc($item, "file");
    }
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

RalphM
Posts: 1248
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Picture Conversion

Post by RalphM » 21 May 2019 03:37

@aurumdigitus - Yes I was aware of your dislike (or whatever we want to call it) of scripting but as highend just proved, there are scripters out there eager to help.
Ralph :-)
(OS: W10 1809 Home x64 - XY: Current beta)

FluxTorpedoe
Posts: 723
Joined: 05 Oct 2011 13:15

Re: Picture Conversion

Post by FluxTorpedoe » 21 May 2019 10:03

Salve, Aurumdigitus,

Well, XYplorer by itself can already answer your specific need, without the need for an external program—but still with a tiny bit of scripting… (And undoubtedly, it won’t be as flexible as highend’s solution.)

So, here’s a no-failsafe barebone solution (it’s been a while since I played code-golf!), that you can use directly or store in your user scripts.

• Select a bunch of your image files to convert, paste this in the address bar, press Enter, and voilà!

Code: Select all

::foreach($item, <selitems |>){savethumb($item,"* ","100%",,"jpg100")}
The images will retain their original name "* ", original size "100%", and will be saved at the highest quality "jpg100".

highend
Posts: 8157
Joined: 06 Feb 2011 00:33

Re: Picture Conversion

Post by highend » 21 May 2019 11:14

Nice flux, never used savethumb before :titter:
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Post Reply