Alchemy functions Image Alchemy is Copyright of Handmade Software, Inc.
Funciones
Real AlcImg2JpgDpi(Text inpPth, Text outPth, Real width, Real height, Real dpi)Text AlcPth = "bin/alchlong.exe"; // Executable path
//////////////////////////////////////////////////////////////////////////////
Real AlcImg2JpgDpi(Text inpPth, // Input file path
Text outPth, // Output file path
Real width, // Width
Real height, // Height
Real dpi) // Dots per inch
//////////////////////////////////////////////////////////////////////////////
{
Text alcDos = Replace(AlcPth,"/","\\")+" ";
Text inpDos = Replace(inpPth,"/","\\");
Text outDos = Replace(outPth,"/","\\");
Text widTxt = FormatReal(width, "%.0lf");
Text heiTxt = FormatReal(height, "%.0lf");
Text widDpi = If(LE(dpi,0), "", "--X"+FormatReal(width /dpi,"%.3lf")+"i ");
Text heiDpi = If(LE(dpi,0), "", "--Y"+FormatReal(height/dpi,"%.3lf")+"i ");
Real sysExe = System(alcDos+ // Executable
"-o -j "+ // Options
"-Xb"+widTxt+" "+ // - width
"-Yb"+heiTxt+" "+ // - height
widDpi+heiDpi+ // - dots per inch
inpDos+" "+ // Input file path
outDos); // Output file path
sysExe
};
//////////////////////////////////////////////////////////////////////////////
PutDescription(
"Convert any image file to a jpeg file of width x heigth pixels and dpi dots
per inch.
If dpi is 0 doesn't use the dots per inch options.",
AlcImg2JpgDpi);
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// FILE : alc.tol
// AUTHOR : http://www.asolver.com
// PURPOSE : Alchemy functions
// Image Alchemy is Copyright of Handmade Software, Inc.
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// CONSTANTS
//////////////////////////////////////////////////////////////////////////////
Text AlcPth = "bin/alchlong.exe"; // Executable path
//////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
Real AlcImg2JpgDpi(Text inpPth, // Input file path
Text outPth, // Output file path
Real width, // Width
Real height, // Height
Real dpi) // Dots per inch
//////////////////////////////////////////////////////////////////////////////
{
Text alcDos = Replace(AlcPth,"/","\\")+" ";
Text inpDos = Replace(inpPth,"/","\\");
Text outDos = Replace(outPth,"/","\\");
Text widTxt = FormatReal(width, "%.0lf");
Text heiTxt = FormatReal(height, "%.0lf");
Text widDpi = If(LE(dpi,0), "", "--X"+FormatReal(width /dpi,"%.3lf")+"i ");
Text heiDpi = If(LE(dpi,0), "", "--Y"+FormatReal(height/dpi,"%.3lf")+"i ");
Real sysExe = System(alcDos+ // Executable
"-o -j "+ // Options
"-Xb"+widTxt+" "+ // - width
"-Yb"+heiTxt+" "+ // - height
widDpi+heiDpi+ // - dots per inch
inpDos+" "+ // Input file path
outDos); // Output file path
sysExe
};
//////////////////////////////////////////////////////////////////////////////
PutDescription(
"Convert any image file to a jpeg file of width x heigth pixels and dpi dots
per inch.
If dpi is 0 doesn't use the dots per inch options.",
AlcImg2JpgDpi);
//////////////////////////////////////////////////////////////////////////////
Ink.Watercolor construye las páginas del sitio web inkwatercolor.com
2015 asolver.com | Aviso legal | XHTML | Δ Θ Ξ | Creative Commons | Mapa y funciones del sitio