Re: Image Format Conversion on OS X with Transmute

2014-06-13 Thread James Dean Palmer
Hi Jerry, I wasn't able to edit the LyX wiki - the Mac page is 
protected with a password other than LyX.


To answer your question, the -n pageno selects the page from the source 
PDF such that it can be rendered to a target (probably not a PDF).  In 
this way you can grab page 22 from your favorite PDF and create a PNG 
thumbnail of it.


I just released 1.2 which adds support for PDF as a target.  As a 
target it currently allows only one page.  The target support is also 
nice for LyX because now I can add these preference lines,


   \converter ps png transmute -i $$i $$o 
   \converter eps png transmute -i $$i $$o 
   \converter pdf png transmute -i $$i $$o 
   \converter eps pdf6 transmute -i $$i $$o 

and now it uses transmute for the eps to pdf conversion (for pdflatex, 
etc.) and not epstopdf which depends on ghostscript.  This has only 
been tested on the book I'm working on so I would appreciate 
testing/feedback by any other Mac users interested in going ghostscript 
free.


The LyX example is also provided in the transmute README,

   https://bitbucket.org/jdpalmer/transmute

James

On 2014-05-30 03:37:32 +, Jerry said:

James, I haven't tried this but it looks awesomely awesome. Would you 
mind making a note on the LyX wiki about it? And maybe an indication, 
if not already present, how to install without brew, e.g., put in 
/some/path for those who don't know this.


And maybe you can help my confusion. PDF is listed as source-file only 
but the note about -n pageno sort of indicates that pageno can be 
applied to rendered PDFs. I'm probably misreading something.


Jerry






Re: Image Format Conversion on OS X with Transmute

2014-06-13 Thread James Dean Palmer
Hi Jerry, I wasn't able to edit the LyX wiki - the Mac page is 
protected with a password other than LyX.


To answer your question, the -n pageno selects the page from the source 
PDF such that it can be rendered to a target (probably not a PDF).  In 
this way you can grab page 22 from your favorite PDF and create a PNG 
thumbnail of it.


I just released 1.2 which adds support for PDF as a target.  As a 
target it currently allows only one page.  The target support is also 
nice for LyX because now I can add these preference lines,


   \converter ps png transmute -i $$i $$o 
   \converter eps png transmute -i $$i $$o 
   \converter pdf png transmute -i $$i $$o 
   \converter eps pdf6 transmute -i $$i $$o 

and now it uses transmute for the eps to pdf conversion (for pdflatex, 
etc.) and not epstopdf which depends on ghostscript.  This has only 
been tested on the book I'm working on so I would appreciate 
testing/feedback by any other Mac users interested in going ghostscript 
free.


The LyX example is also provided in the transmute README,

   https://bitbucket.org/jdpalmer/transmute

James

On 2014-05-30 03:37:32 +, Jerry said:

James, I haven't tried this but it looks awesomely awesome. Would you 
mind making a note on the LyX wiki about it? And maybe an indication, 
if not already present, how to install without brew, e.g., put in 
/some/path for those who don't know this.


And maybe you can help my confusion. PDF is listed as source-file only 
but the note about -n pageno sort of indicates that pageno can be 
applied to rendered PDFs. I'm probably misreading something.


Jerry






Re: Image Format Conversion on OS X with Transmute

2014-06-13 Thread James Dean Palmer
Hi Jerry, I wasn't able to edit the LyX wiki - the Mac page is 
protected with a password other than LyX.


To answer your question, the -n pageno selects the page from the source 
PDF such that it can be rendered to a target (probably not a PDF).  In 
this way you can grab page 22 from your favorite PDF and create a PNG 
thumbnail of it.


I just released 1.2 which adds support for PDF as a target.  As a 
target it currently allows only one page.  The target support is also 
nice for LyX because now I can add these preference lines,


   \converter "ps" "png" "transmute -i $$i $$o" ""
   \converter "eps" "png" "transmute -i $$i $$o" ""
   \converter "pdf" "png" "transmute -i $$i $$o" ""
   \converter "eps" "pdf6" "transmute -i $$i $$o" ""

and now it uses transmute for the eps to pdf conversion (for pdflatex, 
etc.) and not epstopdf which depends on ghostscript.  This has only 
been tested on the book I'm working on so I would appreciate 
testing/feedback by any other Mac users interested in going ghostscript 
free.


The LyX example is also provided in the transmute README,

   https://bitbucket.org/jdpalmer/transmute

James

On 2014-05-30 03:37:32 +, Jerry said:

James, I haven't tried this but it looks awesomely awesome. Would you 
mind making a note on the LyX wiki about it? And maybe an indication, 
if not already present, how to install without brew, e.g., put in 
/some/path for those who don't know this.


And maybe you can help my confusion. PDF is listed as source-file only 
but the note about -n pageno sort of indicates that pageno can be 
applied to rendered PDFs. I'm probably misreading something.


Jerry






Image Format Conversion on OS X with Transmute

2014-05-28 Thread James Dean Palmer
I recently wrote a little command line utility called transmute that 
converts between various image formats using only the Quartz, 
CoreGraphics, and Cocoa APIs.  Apple's sips utility can do the same 
sort of thing but, oddly, sips doesn't support EPS or PS.


transmute also has some other neat tricks like clipboard support, input 
and output from stdin/stdout and setting the page number for conversion 
(PDF only). It's available here:


https://bitbucket.org/jdpalmer/transmute

Once installed, you just need to add this to your preferences file:

\converter ps png transmute $$i $$o 
\converter eps png transmute $$i $$o 
\converter pdf png transmute $$i $$o 

And then there's no more dependency on ghostscript or XQuartz for EPS, 
PS, and PDF image previews.


Best,
James




Image Format Conversion on OS X with Transmute

2014-05-28 Thread James Dean Palmer
I recently wrote a little command line utility called transmute that 
converts between various image formats using only the Quartz, 
CoreGraphics, and Cocoa APIs.  Apple's sips utility can do the same 
sort of thing but, oddly, sips doesn't support EPS or PS.


transmute also has some other neat tricks like clipboard support, input 
and output from stdin/stdout and setting the page number for conversion 
(PDF only). It's available here:


https://bitbucket.org/jdpalmer/transmute

Once installed, you just need to add this to your preferences file:

\converter ps png transmute $$i $$o 
\converter eps png transmute $$i $$o 
\converter pdf png transmute $$i $$o 

And then there's no more dependency on ghostscript or XQuartz for EPS, 
PS, and PDF image previews.


Best,
James




Image Format Conversion on OS X with Transmute

2014-05-28 Thread James Dean Palmer
I recently wrote a little command line utility called transmute that 
converts between various image formats using only the Quartz, 
CoreGraphics, and Cocoa APIs.  Apple's sips utility can do the same 
sort of thing but, oddly, sips doesn't support EPS or PS.


transmute also has some other neat tricks like clipboard support, input 
and output from stdin/stdout and setting the page number for conversion 
(PDF only). It's available here:


https://bitbucket.org/jdpalmer/transmute

Once installed, you just need to add this to your preferences file:

\converter "ps" "png" "transmute $$i $$o" ""
\converter "eps" "png" "transmute $$i $$o" ""
\converter "pdf" "png" "transmute $$i $$o" ""

And then there's no more dependency on ghostscript or XQuartz for EPS, 
PS, and PDF image previews.


Best,
James