Create Preview for vector files

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

user2013
Posts: 2
Joined: Fri Sep 20, 2013 2:06 pm

Create Preview for vector files

Post by user2013 »

Hi, i've been a user of XnConvert however i'm currently in need of converting in batch that it cannot do, i need a command/batch that can search for .eps/.ai files within sub-folders to create the preview.

The output filename needs to be 800px width/auto height, jpg and use the folder name as as file name and saved in the same folder as the source.

I'm not sure how easy or difficult this is but i'm willing to pay to get this done.


Thanks
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Help create simple batch for me pls? Willing to pay for

Post by oops66 »

user2013 wrote:Hi, i've been a user of Xnconvert however i'm currently in need of converting in batch that it cannot do, i need a command/batch that can search for .eps/.ai files within sub-folders to create the preview.

the output filename needs to be 800px width/auto height, jpg and use the folder name as as file name and saved in the same folder as the source.

I'm not sure how easy or difficult this is but i'm willing to pay to get this done.

Thanks
Hello;
... Under linux, with only 2 commands like that from the root directory... ;-)

Code: Select all

cd "your_root_directory"

find . -iname "*.eps" -exec nconvert -out jpeg -o {}__${PWD##*/}.jpg -autocontrast -autolevels -eedge 40 -sharpen 30 -resize 800 0 -ratio {} \;

find . -iname "*.ai" -exec nconvert -out jpeg -o {}__${PWD##*/}.jpg -autocontrast -autolevels -eedge 40 -sharpen 30 -resize 800 0 -ratio {} \;
XnViewMP Linux X64 - Debian - X64
user2013
Posts: 2
Joined: Fri Sep 20, 2013 2:06 pm

Re: Help create simple batch for me pls? Willing to pay for

Post by user2013 »

Thanks very much! is there a windows version? i only have windows but if i have to ill install ubuntu just for this.

i said ill pay so pm your paypal :)
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Help create simple batch for me pls? Willing to pay for

Post by oops66 »

user2013 wrote:Thanks very much! is there a windows version? i only have windows but if i have to ill install ubuntu just for this.
i said ill pay so pm your paypal :)
;-) not needed
XnViewMP Linux X64 - Debian - X64
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Help create simple batch for me pls? Willing to pay for

Post by helmut »

Here's a Windows version of the conversion script:

Code: Select all

@ECHO OFF
REM
REM -------------------------------------------------------------------------------------------------
REM create_preview_for_vector.bat
REM -------------------------------------------------------------------------------------------------
REM Creates a JPEG preview for all .AI and .EPS files in current folder and its subfolders.
REM
REM -------------------------------------------------------------------------------------------------
REM Prerequisite: NConvert and AFPL Ghostscript installed REM
REM -------------------------------------------------------------------------------------------------

SET NCONVERT_APP="C:\Programme\XnView\nconvert.exe"
SET NCONVERT_OPTIONS=-dpi 300 -autocontrast -autolevels -eedge 40 -sharpen 30 -resize 800 0 -ratio -out jpeg

ECHO Processing...
FOR /R %%A IN (*.ai *.eps) DO %NCONVERT_APP% %NCONVERT_OPTIONS% -o "%%~pnA_800px.jpg" "%%A"
ECHO ...completed.

REM Wait for user input via keyboard
PAUSE
EDIT:
This script worked fine for me on Windows XP SP3 with nconvert 6.35 and Ghostscript 8.71.

Let XnView do the thumbnailing job!
Is your intention to have thumbnails for your vector files (*.ai, *.eps)? If yes, you can let XnView do the job for you:
By default XnView's display of thumbnail for vector files is disabled because of performance reasons. But you can enable it. Initial browsing of a folder with vector files will be slow then, but when browsing for a second time XnView will load the thumbnail from its cache and this should be fast.
To enable creation of thumbnails for Vector files please
1.) Select menu "Tools > Options"
2.) In Options dialog, switch to category "Browser file" list.
3.) On the tab "File list", check the checkbox "Show as thumbnail" for AI, PS, PDF files.

Related topic:
- How to display vector formats like PDF, AI,...? GhostScript!