home *** CD-ROM | disk | FTP | other *** search
- /*
- *--- PImageSaveAs.cpp ----------------------------------------------------
- * Copyright (c) 1995-96 Adobe Systems Incorporated. All rights reserved.
- * Created on Sun, Oct 22, 1995 @ 3:29 PM by Paul Ferguson.
- *
- * Description: For notes about this class, refer to the
- * PCL documentation file PImageSaveAs.html
- *-------------------------------------------------------------------------
- */
-
- #include "PImageSaveAs.h"
- #include "PRequestBuf.h"
-
-
-
- PImageSaveAs::PImageSaveAs( // This constructor is for TIFF images.
- const char * sFileName,
- PMBool bLinkOption,
- PMBool bProfile,
- PMBool bCropped,
- short nCompression,
- short nFormatStyle,
- PMBool bSaveForSep,
- short nTIFFOption)
- {
- PRequestBuf request(strlen(sFileName) + 32);
-
- request << sFileName
- << bLinkOption
- << bProfile
- << bCropped
- << (short) 0 // 0 = TIFF
- << nCompression
- << nFormatStyle
- << bSaveForSep
- << nTIFFOption;
-
- PCommand command(pm_imagesaveas, request);
- }
-
-
- PImageSaveAs::PImageSaveAs( // for JPEG images
- const char * sFilename,
- PMBool bLinkOption,
- PMBool bProfile,
- PMBool bCropped,
- short nQuality,
- short nResolution)
- {
- PRequestBuf request(strlen(sFilename) + 32);
-
- request << sFilename
- << bLinkOption
- << bProfile
- << bCropped
- << (short) 1 // 1 = JPEG
- << nQuality
- << nResolution;
-
- PCommand command(pm_imagesaveas, request);
- }
-
- PImageSaveAs::PImageSaveAs( // for GIF images
- const char * sFilename,
- PMBool bLinkOption,
- PMBool bProfile,
- PMBool bCropped,
- short nTransparency,
- PMBool bInterlaced,
- short nColorPalette,
- short nColorDepth,
- short nResolution,
- const char * sCaption)
- {
- PRequestBuf request(strlen(sFilename) + strlen(sCaption) + 32);
-
- request << sFilename
- << bLinkOption
- << bProfile
- << bCropped
- << (short) 2 // 2 = GIF
- << nTransparency
- << bInterlaced
- << nColorPalette
- << nColorDepth
- << nResolution
- << sCaption;
-
- PCommand command(pm_imagesaveas, request);
- }
-
- // end of PImageSaveAs.cpp
-