Ejemplo n.º 1
0
bool JPCFormat::EditPreferences() const
{
   JPEG2000ImageOptions options = DefaultOptions();
   JP2Format::EmbeddingOverrides dummy;

   JPEG2000PreferencesDialog dlg( dummy, options, true );

   if ( dlg.Execute() == StdDialogCode::Ok )
   {
      options = dlg.jp2Options;

      Settings::Write( "JPCLossyCompression", options.lossyCompression );
      Settings::Write( "JPCCompressionRate",  options.compressionRate );
      Settings::Write( "JPCSignedSample",     options.signedSample );
      Settings::Write( "JPCResolutionData",   options.resolutionData );
      Settings::Write( "JPCTiledImage",       options.tiledImage );
      Settings::Write( "JPCTileWidth",        options.tileWidth );
      Settings::Write( "JPCTileHeight",       options.tileHeight );
      Settings::Write( "JPCNumberOfLayers",   options.numberOfLayers );
      Settings::Write( "JPCProgressionOrder", options.progressionOrder );

      return true;
   }

   return false;
}
Ejemplo n.º 2
0
bool JP2Format::EditPreferences() const
{
   JPEG2000ImageOptions options = DefaultOptions();
   EmbeddingOverrides overrides = DefaultEmbeddingOverrides();

   JPEG2000PreferencesDialog dlg( overrides, options, false );

   if ( dlg.Execute() == StdDialogCode::Ok )
   {
      options = dlg.jp2Options;
      overrides = dlg.overrides;

      Settings::Write( "JP2LossyCompression", options.lossyCompression );
      Settings::Write( "JP2CompressionRate",  options.compressionRate );
      Settings::Write( "JP2SignedSample",     options.signedSample );
      Settings::Write( "JP2ResolutionData",   options.resolutionData );
      Settings::Write( "JP2TiledImage",       options.tiledImage );
      Settings::Write( "JP2TileWidth",        options.tileWidth );
      Settings::Write( "JP2TileHeight",       options.tileHeight );
      Settings::Write( "JP2NumberOfLayers",   options.numberOfLayers );
      Settings::Write( "JP2ProgressionOrder", options.progressionOrder );

      Settings::Write( "JP2OverrideICCProfileEmbedding", overrides.overrideICCProfileEmbedding );
      Settings::Write( "JP2EmbedICCProfiles",            overrides.embedICCProfiles );
      Settings::Write( "JP2OverrideMetadataEmbedding",   overrides.overrideMetadataEmbedding );
      Settings::Write( "JP2EmbedMetadata",               overrides.embedMetadata );
      /*
      Settings::Write( "JP2OverrideThumbnailEmbedding",  overrides.overrideThumbnailEmbedding );
      Settings::Write( "JP2EmbedThumbnails",             overrides.embedThumbnails );
      */

      return true;
   }

   return false;
}
Ejemplo n.º 3
0
BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions(params)) {}