Index Help

Créarbo_piwigo

Average rating :
not rated yet

  • Author: websigns
  • Categories: Tool
  • First revision date: 2010-09-21
  • Latest revision date: 2012-02-04
  • Available languages: 1 (see)
  • Compatible with: Piwigo releases 2.0, 2.1, 2.3
  • Downloads: 2284
Français [FR]

About: Créarbo_piwigo

When I started using Piwigo I could not find my account with the other tools here and happily installed pLoader (which no longer works ^ ^). So, listening to my courage (and curiosity), I created my own utility.
This is a first draft - so it can be improved significantly.

This is a "simple" .bat (batch) file, i.e. a set of shell commands associated with the Window's utility, Nconvert.exe, already known here (Pierre-E Gougelet).


DESCRIPTION:

My goal was to make it really easy to use.
This script has the following functions:

- Automatic creation of the tree.
---------. Converted
| ------. Thumbnail
| ------. Pwg_high

- Folder "Converted" to be placed in the same directory as
the selected directory or selected files
(. is the selected directory)
This is automatically done!

- File processing and conversion of all three files is at once, and "NT-" is prefixed to thumbnail names.

- The batch file can be edited directly, easily providing customization.
The different parameters (compression formats, treatment options) are more clustered at the beginning of the file.

- It's very simple to use: just drag files or folder to 'crea_arbo_piwigo.bat' and voila!

- The batch file can be anywhere and is especially useful on the "sendTo" menu (see below).

- The script creates a summary file, "contenu.txt."


ACCURACY:

I designed this script for my needs but also included "useless" (for me) options. For example I routinely use jpeg formatted pictures on the Web, so didn't need to include other formats.
I do not insist on only one input. Two possibilities - directory or file selection - for input gives choice.
OPT is the variable corresponding to the processing options in NConvert. Again I use the most qualitative and/or obvious: keep the ratio of dimensions, "opthuff-" and "-rtype lanczos" arguments for jpeg quality.
Particularity, the "-32bit" on processing the files. This allows PNG format (and others?) that have an alpha channel.
Keep in mind that everything is adaptable by editing the parameters located at the beginning of the file.


USE MENU SENDTO:

The menu "SendTo" can make available various shortcuts to programs, folders, or whatever. It's so universally available through the context menu (right click).
The trick is to stick our batch file (or a shortcut to it) in the menu.

With XP, it's easy to add to the "SendTo" directory located in the user's directory in the 'Documents and Settings' directory.

With Windows 7 (and maybe Vista):
The directory is located here:
C:\Users\[username]\AppData\Roaming\Microsoft\Windows\SendTo

You need full permissions to that folder to be able to copy a shortcut or file.


DIRECTORY of XnView:

Similarly with Windows 7 there is a peculiarity.
Xnview will be (pending a 64bit version) in the directory
"C:\Program Files(x86)\XnView\".
Remember to change this path - even if you do a default installation.

Related links

  • Trac page: source code
  • Nconvert & XNview: XNview est un superbe logiciel de visualisation/gestion d'images. Il offre un nombre de possibilités extraordinaire dans ce domaine, il est rapide et gratuit. Nconvert est en quelques sortes sa version en ligne de commande.

Revision list

expand/collapse all

Revision 2 1469 Downloads, Released on 2012-02-04
Download revision 2

Compatible with: 2.3

Available languages: 1 (see)

Français [FR]

Créarbo_piwigo

This is a "simple" .bat (batch) file, i.e. a set of shell commands associated with the Window's utility, Nconvert.exe, which is well known here (Pierre-e Cougelet).

When I started using Piwigo I could not find my account with the other tools here and happily installed pLoader (which no longer works ^ ^). I wanted to create my own utility.

In a second step - quite satisfied with my utility - but working more often with atypical image formats (panoramic, basically) I wanted to add more. In fact, I wanted to have HD (High Definition) pictures really HD!


GENERAL DESCRIPTION:

My goal was to make it really easy to use.
This script has the following functions:

- Automatic creation of the tree.
---------. Converted
| ------. Thumbnail
| ------. Pwg_high

- Folder "Converted" to be placed in the same directory as
the selected directory or selected files
(. is the selected directory)
This is automatically done!

- File processing and conversion of all three files is at once, and "NT-" is prefixed to thumbnail names.

- The batch file can be edited directly, easily providing customization.
The different parameters (compression formats, treatment options) are more clustered at the beginning of the file.

- It's very simple to use: just drag files or folder to 'crea_arbo_piwigo.bat' and voila!

- The batch file can be anywhere and is especially useful on the "sendTo" menu (see below).

- The script creates a summary file, "contenu.txt."


ACCURACY:

I designed this script for my needs but also included "useless" (for me) options. For example I routinely use jpeg formatted pictures on the Web, so didn't need to include other formats.
It seems to me that this practice is very common and, having said that, especially so for a photo gallery. Furthermore, it allows to significantly simplify the script, and, thus, its performance.

The High Definition format is set at 1280 X 851. (Personal choice but offers good quality while being easy to use.)

Files used as input variable "in" can be defined.
Set "in" can be set equal to one these file formats: *.jpg, *.jpe, *.gif, *.bmp, *.png, *.tif, *.tiff
It is only used for sorting files to process. It can be set with "set in = *. *" to process every file.

OPT is the variable corresponding to the processing options in NConvert. Again I use the most qualitative and/or obvious: keep the ratio of dimensions, "opthuff-" and "-rtype lanczos" arguments for jpeg quality.

Particularity, the "-32bit" on processing the files. This allows PNG format (and others?) that have an alpha channel. Of course jpeg files do not keep this layer (alpha channel) but it's necessary for PNG files with transparency.


PROCESSING ATYPICAL FORMATS (v2):

This part is almost the only change from version 1. So nothing changed except size of HD photos such as atypical vistas and squares. In fact, anything having a width/height ratio different from than the standard 4/3.

To do this the only effective technique I've found is to accurately calculate the W/H, which requires the extraction of these values ​​and then applying the "good" value when processing the HD image.

Step 1: Find the values ​​W & H
Because of what sometimes happens with files with no tags, and also that neither Windows nor DOS provides this information, we use NConvert again to get this information.
Although fairly comprehensive, this utility does not provide this information directly but through a variable "info."
After struggling with DOS commands, I was able to make it work. Look at the code, largely commented, for more info.

Step 2: Give the appropriate width or height.
As there is no perfect image size, input is needed by the utility.
Basically it resolves to variable high definition images needing to adapt to the display dimensions.
In practice, the solution boils down to four possibilities: more or less than 1280 pixels wide, more or less than 851 pixels high.

---------------------------------------

USE FILE SENDTO:

The menu "SendTo" can make available various shortcuts to programs, folders, or whatever. It's so universally available through the context menu (right click).
The trick is to stick our batch file (or a shortcut to it) in the menu.

With XP, it's easy to add to the "SendTo" directory located in the user's directory in the 'Documents and Settings' directory.

With Windows 7 (and maybe Vista):
The directory is located here:
C:\Users\[username]\AppData\Roaming\Microsoft\Windows\SendTo
There is a shortcut blocked in [username]: do not get excited over ;).

You need full permissions to that folder to be able to copy a shortcut or file.

Open the "Properties" panel, go to the "Security" tab, click "Edit."
In this new panel click "Add" and then type your exact connection name in the third panel (or "Search"). Accept in the second panel and then click on your name, check "Full Control" in the column "Allow". Accept and confirm again. Finally it's all good!


DIRECTORY of XnView:

Similarly with Windows 7 there is a peculiarity.
Xnview will be (pending a 64bit version) in the directory "C:\Program Files(x86)\XnView\" instead of "C:\Program Files\XnView\".
Remember to adjust this path in the script if you're still on XP. Just remove "rem" in front of the one line and put it before the other.

Revision 1.0 815 Downloads, Released on 2010-09-21
github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact