A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Sort files by aspect ratio?



 
 
Thread Tools Rate Thread Display Modes
  #16  
Old August 7th 18, 10:40 PM posted to alt.comp.freeware,alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default Sort files by aspect ratio?

In article , Wolf K
wrote:

| otherwise known as photo asset manager, such as adobe lightroom:

| Which I assume is free.
|

Yes, once you've delivered your firstborn.
Alternatively, you can pay Adobe "an arm and
a leg" gradually by renting Abode Creative suite
by the month.


where 'arm and a leg' is just $10/mo, less than a large pizza.


Poor example: fast-food pizzas are almost inedible, the frozen things
you get the market are almost as bad, and the good ones from a good
Italian restaurant cost a good deal more than $10.


i wasn't referring to any particular pizza seller, but if it's 'a good
deal more than $10' then the point is even stronger.

and the best pizza is usually from a good pizza shop, not an italian
restaurant anyway, especially one that *only* sells pizza.
Ads
  #17  
Old August 7th 18, 10:40 PM posted to alt.comp.freeware,alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default Sort files by aspect ratio?

In article , Wolf K
wrote:


Free versions are available from several sources, but on Adobe's own
website it's payware. Unclear exactly what "Lightroom" means in this
context.


what's unclear?

lightroom is the name of adobe's photo asset manager:
https://www.adobe.com/products/photoshop-lightroom.html


And this:

https://adobe-photoshop-lightroom.en.softonic.com/


no, definitely *not* that.

seriously, wtf!

*always* download from the developer's own site, or alternately, from
the app store for the relevant platform.

*never* download from another source unless you are *absolutely* sure
it's genuine and can confirm it, ideally with a hash.

otherwise, there is a very significant risk getting an unexpected and
undesirable bonus, aka malware, adware, etc., especially if the source
claims something is free when the real thing is not.

softonic in particular is to be *avoided*:

https://blog.malwarebytes.com/detections/pup-optional-softonic/
Short bio
PUP.Optional.Softonic is Malwarebytes¹ generic detection name for the
Softonic Downloader, an adware-supported bundler targeting Windows
systems.

Type and source of infection
PUP.Optional.Softonic uses manipulative UI options to prompt users to
install further adware that is difficult to uninstall. Softonic had
previously included a toolbar with their download that required admin
privileges, and changed the user¹s home page to softonic.com. Some
software previously included by Softonic have been considered
actively malicious.

Softonic Downloader is found on Softonic affiliated downloads at
en.softonic.com.

https://www.microsoft.com/en-us/wdsi...clopedia-descr
iption?Name=PUA:Win32/Softonic
PUA:Win32/Softonic
....
These applications are most commonly software bundlers or installers
for applications such as toolbars, adware, or system optimizers.

If you were trying to install an application, you might have
downloaded it from a source other than the official product's website.
  #18  
Old August 7th 18, 11:37 PM posted to alt.comp.freeware,alt.comp.os.windows-10
VanguardLH[_2_]
external usenet poster
 
Posts: 10,881
Default Sort files by aspect ratio?

Terry Pinnell wrote:

Anyone know of a tool or hack that will do something that Win 10 File
Explorer unfortunately cannot: sort a folder of files into aspect ratio
(width/height)?

It's an operation I need quite frequently, such as when trying to
isolate all files with say a 16:9 ratio (to some fine tolerance if
necessary).


In XnView, I can sort by image size, image width, image height, and a
bunch of other attributes.

For images (photos), I can see how such attributes would be known
without having to render the image. I'm not sure the same would work
for video files. I'd have to find out if that info was available BEFORE
the codec gets used to decode the content. The metadata might be there
(but not for all video formats) but some of it could be blank, and
having to play a video to ensure getting its valid aspect ratio would
take way too long to interrogate to then sort. I'm no video wizard and
there are other newsgroups more into video where the community there
would know more about what is in the video file (other than just
metadata which could me absent, blank, or incorrect) to know if its
aspect ratio could be determine without have to engage the codec to
decode. In VLC, I can go to Tools - Codec to see the video dimensions
but that's after VLC has already started using the codec to play the
video.

So, no, not in Windows/File Explorer do I know a way to sort by width,
height, or the combo of the two as an aspect ratio (16:9 would be 1.77)
but other image tools appear to have the feature. I doubt XnView would
be the only image manager/viewer to have those sort selections. If
XnView has it then I would suspect Irfanview to have it, too. Instead
of using Windows/File Explorer to manage your image collections, you use
a tool that was actually geared to handle and manage images. There are
many uses for a flat-blade screwdriver but it's not really a good choice
for jamming into a torx screw head.
  #19  
Old August 7th 18, 11:43 PM posted to alt.comp.freeware,alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Sort files by aspect ratio?

"Wolf K" wrote

| where 'arm and a leg' is just $10/mo, less than a large pizza.
|
|
| Poor example: fast-food pizzas are almost inedible, the frozen things
| you get the market are almost as bad, and the good ones from a good
| Italian restaurant cost a good deal more than $10.
|

And you don't have to pay for them every month
for the forseeable future. $10/month is $480 in
4 years. I paid $50 for Paint Shop Pro 16 about 4
years ago. It's certainly not out of date.


  #20  
Old August 8th 18, 12:02 AM posted to alt.comp.freeware,alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default Sort files by aspect ratio?

In article , Mayayana
wrote:

| where 'arm and a leg' is just $10/mo, less than a large pizza.
|
|
| Poor example: fast-food pizzas are almost inedible, the frozen things
| you get the market are almost as bad, and the good ones from a good
| Italian restaurant cost a good deal more than $10.

And you don't have to pay for them every month
for the forseeable future.


you do if you want pizza every month.

i usually eat pizza more often than once a month, but maybe you don't
like pizza.

$10/month is $480 in
4 years. I paid $50 for Paint Shop Pro 16 about 4
years ago. It's certainly not out of date.


paint shop pro is comparable to photoshop elements, which is usually
around $50-60 street price and a one time purchase.

lightroom is a totally different ballgame.
  #21  
Old August 8th 18, 02:05 AM posted to alt.comp.freeware,alt.comp.os.windows-10
Zaidy036[_5_]
external usenet poster
 
Posts: 427
Default Sort files by aspect ratio?

On 8/7/2018 7:27 AM, Terry Pinnell wrote:
Anyone know of a tool or hack that will do something that Win 10 File
Explorer unfortunately cannot: sort a folder of files into aspect ratio
(width/height)?

It's an operation I need quite frequently, such as when trying to
isolate all files with say a 16:9 ratio (to some fine tolerance if
necessary).

Terry, East Grinstead, UK

How about using BR's EXIFextracter and Excel?
http://www.br-software.com/extracter.html

--
Zaidy036
  #22  
Old August 8th 18, 02:46 AM posted to alt.comp.freeware,alt.comp.os.windows-10
Bob_S[_3_]
external usenet poster
 
Posts: 33
Default Sort files by aspect ratio?

"Keith Nuttle" wrote in message news

On 8/7/2018 7:27 AM, Terry Pinnell wrote:
Anyone know of a tool or hack that will do something that Win 10 File
Explorer unfortunately cannot: sort a folder of files into aspect ratio
(width/height)?

It's an operation I need quite frequently, such as when trying to
isolate all files with say a 16:9 ratio (to some fine tolerance if
necessary).

Terry, East Grinstead, UK

Could you sort one of the extra columns (right click column Headers) and
sort of height or width?





I'm not seeing the OP's post directly but there is a "Dimension" selection
in Explorer that will sort by height and width. Be sure you are set to view
Details, then right-click on the bar that has the attributes (Name, Type,
Size, etc.) and select "More" in the pop-up window and then scroll down to
"Dimensions" and place a checkmark in it. You can now select the
"Dimension" attribute and it will auto sort by size. May be close enough to
work for what you want.

--


Bob S.

  #23  
Old August 8th 18, 02:59 AM posted to alt.comp.freeware,alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Sort files by aspect ratio?

"Bob_S" wrote

| I'm not seeing the OP's post directly but there is a "Dimension" selection
| in Explorer that will sort by height and width. Be sure you are set to
view
| Details, then right-click on the bar that has the attributes (Name, Type,
| Size, etc.) and select "More" in the pop-up window and then scroll down to
| "Dimensions" and place a checkmark in it. You can now select the
| "Dimension" attribute and it will auto sort by size. May be close enough
to
| work for what you want.
|

Also note that it sorts alphabetically. So 400x800
will come before 4010x200, which will come before
41x600. Explorer won't sort them in a useful way.


  #24  
Old August 8th 18, 04:46 AM posted to alt.comp.freeware,alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Sort files by aspect ratio?

Mayayana wrote:
"Bob_S" wrote

| I'm not seeing the OP's post directly but there is a "Dimension" selection
| in Explorer that will sort by height and width. Be sure you are set to
view
| Details, then right-click on the bar that has the attributes (Name, Type,
| Size, etc.) and select "More" in the pop-up window and then scroll down to
| "Dimensions" and place a checkmark in it. You can now select the
| "Dimension" attribute and it will auto sort by size. May be close enough
to
| work for what you want.
|

Also note that it sorts alphabetically. So 400x800
will come before 4010x200, which will come before
41x600. Explorer won't sort them in a useful way.



You can click the Width column and make it sort in order,
then shift-click the head of the Height column, to
make it a secondary selection and sort by its columnar
value second.

https://s22.postimg.cc/7hal8kjip/shi..._selection.gif

Start with "Detailed" view, then edit the column headers
and add Width as a new column and Height as a new column.

Not that this will save the OP from "years of hard labor".

And after looking at some of the metadata editor
web articles, I'm not at all sure there's an easy way to
do this (for free). It looks like the kind of project
I'd spend three days on it, and give up in frustration.

It's quite possible Terry has multiple metadata types
on disk, and the solution used, would have to deal wth
any of them (EXIF/IPTC/XMP). Cooking up just an EXIF
solution might not be enough.

Paul
  #25  
Old August 8th 18, 06:14 AM posted to alt.comp.freeware,alt.comp.os.windows-10
B. R. 'BeAr' Ederson
external usenet poster
 
Posts: 8
Default Sort files by aspect ratio?

On Tue, 07 Aug 2018 12:27:21 +0100, Terry Pinnell wrote:

Anyone know of a tool or hack that will do something that Win 10 File
Explorer unfortunately cannot: sort a folder of files into aspect ratio
(width/height)?

It's an operation I need quite frequently, such as when trying to
isolate all files with say a 16:9 ratio (to some fine tolerance if
necessary).


Maybe you use Dimension2Folder by Jody Holmes to sort the images into
different (sub)folders and do whatever you want to do with them, there.
Later on, you can recombine the images into one directory.

http://www.dcmembers.com/skwire/down...ions-2-folders

F-Up set to acf.
BeAr
--
================================================== =========================
= What do you mean with: "Perfection is always an illusion"? =
================================================== =============--(Oops!)===
  #26  
Old August 8th 18, 02:44 PM posted to alt.comp.freeware,alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Sort files by aspect ratio?

"Paul" wrote

| It's quite possible Terry has multiple metadata types
| on disk, and the solution used, would have to deal wth
| any of them (EXIF/IPTC/XMP). Cooking up just an EXIF
| solution might not be enough.
|

No. And pulling EXIF data is a sloppy way to go
about it if you have a lot of images. There are
reasonably simple ways to parse the file header.
The trouble is it gets into custom scripting rather
than clicking buttons.

The simplest way is as follows, using an obscure
method available to Windows Script Host. Save this
as a .vbs and drop any BMP, JPG or GIF on it to
get specs:

Dim Pic, Arg, PPI, Ht, Wd

PPI = 96 'for large fonts setting use 120.
Arg = WScript.Arguments(0)
Set Pic = LoadPicture(Arg)
Ht = CInt((PPI * Pic.height) / 2540)
Wd = CInt((PPI * Pic.width) / 2540)
MsgBox Wd & " x " & Ht
Set Pic = Nothing

'-- end script--------------------------------

It's faster and far less work intensive to just
open the file and read in a bit of the header.
That can also be done with PNGs. But the script
code is much more complex. LoadPicture seems
to be actually loading the whole file as a
device-independent bitmap and then using API
to get the specs. Very sloppy internally, but
very simple from the outside. It bypasses the
problem of no EXIF, so it will work on all common
images except PNG/TIF.

But then there are still the steps of walking
the filesystem to find images, calculating the
w/h ratios, deciding on a degree of accuracy,
and finally figuring out a system to be able to
find those files again, such as making a new
folder and copying all 16:9 images into it. None
of that is really difficult, but it's not easy to get
tools to automate it. It's a classic example of
a job suited for scripting.


  #27  
Old August 8th 18, 07:24 PM posted to alt.comp.freeware,alt.comp.os.windows-10
Terry Pinnell[_3_]
external usenet poster
 
Posts: 732
Default Sort files by aspect ratio?

Zaidy036 wrote:

On 8/7/2018 7:27 AM, Terry Pinnell wrote:
Anyone know of a tool or hack that will do something that Win 10 File
Explorer unfortunately cannot: sort a folder of files into aspect ratio
(width/height)?

It's an operation I need quite frequently, such as when trying to
isolate all files with say a 16:9 ratio (to some fine tolerance if
necessary).

Terry, East Grinstead, UK

How about using BR's EXIFextracter and Excel?
http://www.br-software.com/extracter.html


1. Not all images have EXIF data
2. EXIF data does not include AR.

Terry, East Grinstead, UK
  #28  
Old August 8th 18, 07:46 PM posted to alt.comp.freeware,alt.comp.os.windows-10
Terry Pinnell[_3_]
external usenet poster
 
Posts: 732
Default Sort files by aspect ratio?

Reinhard Skarbal wrote:

In article , lid says...

Terry Pinnell wrote:
Anyone know of a tool or hack that will do something that Win 10 File
Explorer unfortunately cannot: sort a folder of files into aspect ratio
(width/height)?

It's an operation I need quite frequently, such as when trying to
isolate all files with say a 16:9 ratio (to some fine tolerance if
necessary).

Terry, East Grinstead, UK


The third-party examples I could find, seem to
want to "sort" your image collection, into folders,
according to the complex criteria. So instead
of a search as such, they meddle with the collection.

*******

The only thing I can think of, is edit the metadata
on the images, find a field that is searchable
from Windows Search, then write a representative
value into that field in place of the original data.
Then, rebuild the Search Index, to use the new info.

Instead of writing 1.7778 into the field, if the field
was of string type, you could write "16:9" as a text
string.

So maybe in place of Camera, where it says "Nikon",
you could make the Camera "16:9" brand instead :-)

If would be fun if the Search Index was extensible,
but I don't get the impression it's programmable.
And it's limited to a subset of metadata field types.

Maybe it would take some scripting with EXIFTool or
similar. You would want a tool that doesn't mess up
the file system dates as well (which would be an added
complexity).

*******

If you could have, in effect, a File Manager separate
from Windows, with such complex sorting capabilities,
that would be another way to do it.

*******

Running parallel collections is another way to solve it.


Hi Terry

For Windows 10 :
Writing a little script in awk which is using EXIFTOOL will do the job.
This script will create a batch-file for moving (or copying) all
pictures of an certain witdth/height (+- n %) into a new folder.

If you like I will write this script for you in a few days for nothing.
Just send me an email.

Regards
Reinhard



Hi Reinhard,

Thanks, that's very generous of you. Is an awk script simple to run
under Windows? Perhaps we could test that first if you have a basic
script at hand? Something at the 'Hello World' level, with no-brainer
instructions on how to run it?

Did you see my 'macro outline' up-thread?

Terry, East Grinstead, UK
  #29  
Old August 8th 18, 09:00 PM posted to alt.comp.freeware,alt.comp.os.windows-10
Terry Pinnell[_3_]
external usenet poster
 
Posts: 732
Default Sort files by aspect ratio?

"Mayayana" wrote:

"Paul" wrote

| It's quite possible Terry has multiple metadata types
| on disk, and the solution used, would have to deal wth
| any of them (EXIF/IPTC/XMP). Cooking up just an EXIF
| solution might not be enough.
|

No. And pulling EXIF data is a sloppy way to go
about it if you have a lot of images. There are
reasonably simple ways to parse the file header.
The trouble is it gets into custom scripting rather
than clicking buttons.

The simplest way is as follows, using an obscure
method available to Windows Script Host. Save this
as a .vbs and drop any BMP, JPG or GIF on it to
get specs:

Dim Pic, Arg, PPI, Ht, Wd

PPI = 96 'for large fonts setting use 120.
Arg = WScript.Arguments(0)
Set Pic = LoadPicture(Arg)
Ht = CInt((PPI * Pic.height) / 2540)
Wd = CInt((PPI * Pic.width) / 2540)
MsgBox Wd & " x " & Ht
Set Pic = Nothing

'-- end script--------------------------------

It's faster and far less work intensive to just
open the file and read in a bit of the header.
That can also be done with PNGs. But the script
code is much more complex. LoadPicture seems
to be actually loading the whole file as a
device-independent bitmap and then using API
to get the specs. Very sloppy internally, but
very simple from the outside. It bypasses the
problem of no EXIF, so it will work on all common
images except PNG/TIF.

But then there are still the steps of walking
the filesystem to find images, calculating the
w/h ratios, deciding on a degree of accuracy,
and finally figuring out a system to be able to
find those files again, such as making a new
folder and copying all 16:9 images into it. None
of that is really difficult, but it's not easy to get
tools to automate it. It's a classic example of
a job suited for scripting.


Thanks, will study that asap.

Terry, East Grinstead, UK
  #30  
Old August 8th 18, 10:39 PM posted to alt.comp.freeware,alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Sort files by aspect ratio?

"Terry Pinnell" wrote

| Thanks, will study that asap.
|
If you're interested in working on it you can try this:
(Watch out for wordwrap.) Paste the following into
Notepad, save as a .vbs file. Drop any folder onto it.
You should get a folder created inside with copies of
all images found within 5% of 16/9 ratio that are JPG,
GIF, or BMP. It will also search subfolders.

One one run it didn't pick up a very large image.
I'm not sure if there was a reason for that. If it
turns out to be a problem the script might need
a pause built in for copying big files.

There's not much here for error trapping. You
must drop a valid folder. It also uses the simple
LoadPicture method. Code could be added to
deal with PNGs but that would cost extra.


' --- begin script ----------------
Dim FSO, arg, sPath, oFol1, sFol, iCount, iTotalImg, iTotal, sMsg
On Error Resume Next

'--Get folder dropped on script or use InputBox:


sPath = WScript.Arguments(0)
Set FSO = CreateObject("Scripting.FileSystemObject")
If sPath = "" Or FSO.FolderExists(sPath) = False Then WScript.Quit

Set oFol1 = FSO.CreateFolder(sPath & "\16-9")
Set oFol1 = Nothing
sFol = sPath & "\16-9\"
iCount = 0

DoSearch sPath
Set FSO = Nothing

sMsg = iTotalImg & " image files found of " & iTotal & " total files."
sMsg = sMsg & vbCrLf & iCount & " fitting ratio requirements"
sMsg = sMsg & " and copied to " & sFol
MsgBox sMsg

Sub DoSearch(FolPath)
Dim SubPath, Fol, oFol, Fils, oFil, Fols, sExt, LRatio
Set oFol = FSO.GetFolder(FolPath)
Set Fils = oFol.Files
If Fils.count 0 Then
For Each oFil in Fils
iTotal = iTotal + 1
sExt = UCase(Right(oFil.Name, 4))
If sExt = ".JPG" Or sExt = ".GIF" Or sExt = ".BMP" Then
iTotalImg = iTotalImg + 1
LRatio = GetRat(oFil.Path)
If Len(LRatio) 0 Then
If FSO.FileExists(sFol & oFil.name) = False Then
FSO.CopyFile oFil.path, sFol & oFil.name, False
iCount = iCount + 1
End If
End If
End If
Next
End If

Set Fols = oFol.SubFolders
If Fols.count 0 Then
For Each Fol in Fols
SubPath = Fol.Path
DoSearch SubPath
Next
End If
Set Fols = Nothing

Set Fils = Nothing
Set oFol = Nothing

End Sub

Function GetRat(PicPath)
Dim Pic, arg1, PPI, Ht, Wd, Ht9, Wd16
On Error Resume Next
GetRat = ""
PPI = 96 'for large fonts setting use 120.
Set Pic = LoadPicture(PicPath)
Ht = CInt((PPI * Pic.height) / 2540)
Wd = CInt((PPI * Pic.width) / 2540)
Set Pic = Nothing
If Ht Wd Then Exit Function
Ht9 = Ht / 9
Wd16 = Ht9 * 16
If (Wd16 (.95 * Wd)) And (Wd16 (1.05 * Wd)) Then GetRat = PicPath
End Function


 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 04:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.