Page 2 of 2

Re: Snapshot

Posted: 12 Apr 2015 16:11
by admin
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. :)

Re: Snapshot

Posted: 17 Apr 2015 16:40
by admin
Just created this beauty. Works like a charm. If you have anything to say (ideas...) do so now. :D :cup: (upload tonight)

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

Re: Snapshot

Posted: 17 Apr 2015 19:32
by zer0
What about a little drop-shade ala OS X?

Re: Snapshot

Posted: 17 Apr 2015 19:39
by admin
A drop shade saved in a file? :eh:

Re: Snapshot

Posted: 17 Apr 2015 20:42
by zer0
admin wrote:A drop shade saved in a file? :eh:
Sorry, got my wires crossed. It's a Friday and not enough :cup: It was a reference to this...

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! :)

Re: Snapshot

Posted: 17 Apr 2015 21:06
by klownboy
admin wrote:Just created this beauty. Works like a charm. If you have anything to say (ideas...) do so now.
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.
Thanks,
Ken

Re: Snapshot

Posted: 17 Apr 2015 21:48
by admin
I think I prefer you use you own loops. Looks cleaner to me.

Re: Snapshot

Posted: 17 Apr 2015 21:56
by klownboy
admin wrote:I think I prefer you use you own loops. Looks cleaner to me.
No problem Don. Thanks.