Example #1
0
        private Tiff()
        {
            m_clientdata       = 0;
            m_postDecodeMethod = PostDecodeMethodType.pdmNone;

            setupBuiltInCodecs();

            m_defaultTagMethods = new TiffTagMethods();

            if (m_errorHandler == null)
            {
                // user did not setup custom handler.
                // install default
                m_errorHandler = new TiffErrorHandler();
            }
        }
Example #2
0
        /*
        * Setup a default directory structure.
        */
        private void setupDefaultDirectory()
        {
            int tiffFieldInfoCount;
            TiffFieldInfo[] tiffFieldInfo = getFieldInfo(out tiffFieldInfoCount);
            setupFieldInfo(tiffFieldInfo, tiffFieldInfoCount);

            m_dir = new TiffDirectory();
            m_postDecodeMethod = PostDecodeMethodType.pdmNone;
            m_foundfield = null;

            m_tagmethods = m_defaultTagMethods;

            /*
             *  Give client code a chance to install their own
             *  tag extensions & methods, prior to compression overloads.
             */
            if (m_extender != null)
                m_extender(this);

            SetField(TiffTag.Compression, Compression.None);

            /*
             * NB: The directory is marked dirty as a result of setting
             * up the default compression scheme.  However, this really
             * isn't correct -- we want DirtyDirect to be set only
             * if the user does something.  We could just do the setup
             * by hand, but it seems better to use the normal mechanism
             * (i.e. SetField).
             */
            m_flags &= ~TiffFlags.DirtyDirect;

            /*
             * we clear the IsTiled flag when setting up a new directory.
             * Should we also be clearing stuff like InSubIFD?
             */
            m_flags &= ~TiffFlags.IsTiled;

            /*
             * Clear other directory-specific fields.
             */
            m_tilesize = -1;
            m_scanlinesize = -1;
        }
Example #3
0
        private Tiff()
        {
            m_clientdata = 0;
            m_postDecodeMethod = PostDecodeMethodType.pdmNone;

            setupBuiltInCodecs();

            m_defaultTagMethods = new TiffTagMethods();

            m_defaultErrorHandler = null;
            if (m_errorHandler == null)
            {
                // user did not setup custom handler.
                // install default
                m_defaultErrorHandler = new TiffErrorHandler();
                m_errorHandler = m_defaultErrorHandler;
            }
        }