コード例 #1
0
        /// <summary>
        /// Handles the Click event of Jpeg2000SettingsButton object.
        /// </summary>
        private void jpeg2000SettingsButton_Click(object sender, EventArgs e)
        {
            // create JPEG2000 encoder settings form
            using (Jpeg2000EncoderSettingsForm dialog = new Jpeg2000EncoderSettingsForm())
            {
                // set current JPEG2000 encoder settings
                dialog.EncoderSettings = EncoderSettings.Jpeg2000EncoderSettings;

                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    // update JPEG2000 encoder settings

                    EncoderSettings.Jpeg2000EncoderSettings.CompressionRatio            = dialog.EncoderSettings.CompressionRatio;
                    EncoderSettings.Jpeg2000EncoderSettings.CompressionType             = dialog.EncoderSettings.CompressionType;
                    EncoderSettings.Jpeg2000EncoderSettings.EncodeAlphaChannelInPalette = dialog.EncoderSettings.EncodeAlphaChannelInPalette;
                    EncoderSettings.Jpeg2000EncoderSettings.FileFormat       = dialog.EncoderSettings.FileFormat;
                    EncoderSettings.Jpeg2000EncoderSettings.FileSize         = dialog.EncoderSettings.FileSize;
                    EncoderSettings.Jpeg2000EncoderSettings.ProgressionOrder = dialog.EncoderSettings.ProgressionOrder;
                    EncoderSettings.Jpeg2000EncoderSettings.QualityLayers    = dialog.EncoderSettings.QualityLayers;
                    EncoderSettings.Jpeg2000EncoderSettings.TileHeight       = dialog.EncoderSettings.TileHeight;
                    EncoderSettings.Jpeg2000EncoderSettings.TileWidth        = dialog.EncoderSettings.TileWidth;
                    EncoderSettings.Jpeg2000EncoderSettings.WaveletLevels    = dialog.EncoderSettings.WaveletLevels;
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Handles the Click event of Jpeg2000SettingsButton object.
        /// </summary>
        private void jpeg2000SettingsButton_Click(object sender, EventArgs e)
        {
            // create JPEG2000 encoding settings
            using (Jpeg2000EncoderSettingsForm jpeg2000SettingsDialog = new Jpeg2000EncoderSettingsForm())
            {
#if !REMOVE_PDF_PLUGIN
                jpeg2000SettingsDialog.EncoderSettings = _compressionSettings.Jpeg2000Settings;
#endif
                // show dialog
                jpeg2000SettingsDialog.ShowDialog();
            }
        }