home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / pm65sdk / sourcecode / pagemakerclasslibrary / commands / pimagesaveas.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-29  |  2.1 KB  |  93 lines

  1. /*
  2.  *--- PImageSaveAs.cpp ----------------------------------------------------
  3.  * Copyright (c) 1995-96 Adobe Systems Incorporated.  All rights reserved.
  4.  * Created on Sun, Oct 22, 1995 @ 3:29 PM by Paul Ferguson.
  5.  *
  6.  * Description:  For notes about this class, refer to the
  7.  * PCL documentation file PImageSaveAs.html
  8.  *-------------------------------------------------------------------------
  9.  */
  10.  
  11. #include "PImageSaveAs.h"
  12. #include "PRequestBuf.h"
  13.  
  14.  
  15.  
  16. PImageSaveAs::PImageSaveAs(        // This constructor is for TIFF images.
  17.     const char *    sFileName,
  18.     PMBool            bLinkOption,
  19.     PMBool            bProfile,
  20.     PMBool            bCropped,
  21.     short            nCompression,
  22.     short            nFormatStyle,
  23.     PMBool            bSaveForSep,
  24.     short            nTIFFOption)
  25. {
  26.     PRequestBuf request(strlen(sFileName) + 32);
  27.     
  28.     request << sFileName
  29.             << bLinkOption
  30.             << bProfile
  31.             << bCropped
  32.             << (short) 0        // 0 = TIFF
  33.             << nCompression
  34.             << nFormatStyle
  35.             << bSaveForSep
  36.             << nTIFFOption;
  37.  
  38.     PCommand command(pm_imagesaveas, request);
  39. }
  40.  
  41.     
  42. PImageSaveAs::PImageSaveAs(        // for JPEG images
  43.     const char *    sFilename,
  44.     PMBool            bLinkOption,
  45.     PMBool            bProfile,
  46.     PMBool            bCropped,
  47.     short            nQuality,
  48.     short            nResolution)
  49. {
  50.     PRequestBuf request(strlen(sFilename) + 32);
  51.     
  52.     request << sFilename
  53.             << bLinkOption
  54.             << bProfile
  55.             << bCropped
  56.             << (short) 1        // 1 = JPEG
  57.             << nQuality
  58.             << nResolution;
  59.  
  60.     PCommand command(pm_imagesaveas, request);
  61. }
  62.     
  63. PImageSaveAs::PImageSaveAs(        // for GIF images
  64.     const char *    sFilename,
  65.     PMBool            bLinkOption,
  66.     PMBool            bProfile,
  67.     PMBool            bCropped,
  68.     short            nTransparency,
  69.     PMBool            bInterlaced,
  70.     short            nColorPalette,
  71.     short            nColorDepth,
  72.     short            nResolution,
  73.     const char *    sCaption)
  74. {
  75.     PRequestBuf request(strlen(sFilename) + strlen(sCaption) + 32);
  76.     
  77.     request << sFilename
  78.             << bLinkOption
  79.             << bProfile
  80.             << bCropped
  81.             << (short) 2        // 2 = GIF
  82.             << nTransparency
  83.             << bInterlaced
  84.             << nColorPalette
  85.             << nColorDepth
  86.             << nResolution
  87.             << sCaption;
  88.  
  89.     PCommand command(pm_imagesaveas, request);
  90. }
  91.  
  92. // end of PImageSaveAs.cpp
  93.