Snapshot
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Snapshot
I decided to just add SC SaveThumb(), and then let you scriptors do all the magic then possible. I personally would like to order an HTML photo album with photo data along with the thumbs, just like in Tiles view. 
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Snapshot
Just created this beauty. Works like a charm. If you have anything to say (ideas...) do so now.
(upload tonight)
EDIT: sizing by percentage might be an idea...
EDIT: sizing by percentage might be an idea...
Code: Select all
+ Scripting got a new function.
Name: SaveThumb
Action: Saves the thumbnail of a file to a file.
Syntax: savethumb(file="<curitem>, thumbnail_file="*_thumb", _
widthbox=500, heightbox=500, format="jpg")
file: [optional] The name of the source file.
If omitted a list of sections is returned.
Defaults to the current list item.
thumbnail_file: [optional] The name of the target file.
Defaults to "*_thumb" (see remarks).
The path is resolved relative to the path of >file<.
The extension is set to >format< if missing.
widthbox: [optional] The width of the thumbnail's bounding box.
Defaults to 500.
heightbox: [optional] The height of the thumbnail's bounding box.
Defaults to 500.
format: [optional] Format of the thumbnail file.
Can be one of the following:
jpg, png, gif, bmp, tif
Defaults to "jpg".
return: The full path/name of the saved thumbnail file.
Remarks:
- The thumbnail_file argument supports a couple of variables:
<width> = actual thumbnail width
<height> = actual thumbnail height
<widthbox> = bounding box width
<heightbox> = bounding box height
* = base name of the source image file
- If the original is smaller than the bounding box it is NOT stretched.
- If a file of the same name exists it is overwritten without asking.
- If no thumbnail can be created from >file< the function raises an error.
Examples:
echo savethumb(); //creates autonamed JPG 500x500
echo savethumb(, "*-<width>x<height>", 400, 400, "jpg");
echo savethumb("E:\Test.pdf", , 400, 500, "png"); //creates E:\Test_thumb.png
FAQ | XY News RSS | XY X
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: Snapshot
What about a little drop-shade ala OS X?
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: Snapshot
Sorry, got my wires crossed. It's a Friday and not enoughadmin wrote:A drop shade saved in a file?
Code: Select all
v15.00.0402 - 2015-04-17 10:31
+ Floating Preview: Being a sucker for white borders on photos I did myself
a favor and added the option to show them to the Floating Preview. It's in
the extended context menu of the FP: Ctrl+RightClick | White Border.
I chose some factory defaults to my own likings (width of the border is 8%
of the smaller image dimension; a small shadow is shown). You can tweak
them here:
FPWhiteBorderPercent=8
FPWhiteBorderShadow=1
Enjoy! :)Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
klownboy
- Posts: 4462
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440
Re: Snapshot
Tried it and like it - very cool. Is there anyway to use your new SC savethumb to save thumbnails on multiple files? For example, using the same file names with an add-on like "_thumb" as in "Ibiza Balearic Islands_thumb.jpg" with the same or different extension. It might be nice for the SC to accept a separated list where we could specify the default modification to the filename and extension. If not we can use loops (ie., foreach) on selected or filtered image files.admin wrote:Just created this beauty. Works like a charm. If you have anything to say (ideas...) do so now.
Thanks,
Ken
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
klownboy
- Posts: 4462
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440
Re: Snapshot
No problem Don. Thanks.admin wrote:I think I prefer you use you own loops. Looks cleaner to me.
XYplorer Beta Club