Hello Christophe, hello all,
> On 10 February 2018 at 21:44 BLANCHARD Christophe 
> <christophe.blanch...@3ds.com> wrote:
> 
> 
> Hello all,
> 
> This patch to make GetFromResources function supporting ColorSpace that can 
> be an array:
> 
> PdfObject* PdfPage::GetFromResources( const PdfName & rType, const PdfName & 
> rKey )
> {
>         if( m_pResources->GetDictionary().HasKey( rType ) )
>         {
>                 // OC 15.08.2010 BugFix: Ghostscript creates here sometimes 
> an indirect reference to a directory
>                 // PdfObject* pType = m_pResources->GetDictionary().GetKey( 
> rType );
>                 PdfObject* pType = m_pResources->GetIndirectKey( rType );
>                 if( pType->IsDictionary() && pType->GetDictionary().HasKey( 
> rKey ) )
>                 {
>                         PdfObject* pObj = pType->GetDictionary().GetKey( rKey 
> );        // CB 08.12.2017 Can be an array
>                         if (pObj->IsReference()) {
>                                 const PdfReference & ref = 
> pObj->GetReference();
>                                 return 
> this->GetObject()->GetOwner()->GetObject( ref );
>                         }
>                         return pObj;                                          
>           // END
>                 }
>         }
> 
>         return NULL;
> }
> 

this patch looks fine, although it doesn't check for an entry being an array;
I don't think that's necessary at this time. I've received your email on Sun,
11 Feb 2018, 20:03 +0100 (CET), I'm sorry for answering it only an hour more
than a month later. As an aside: Patches submitted should be in attachments,
not in the mail body, except if extensive discussion of parts (which would
need to quoted) is foreseen.

I've committed your patch with minor (brace-style) alterations in svn r1910:
https://sourceforge.net/p/podofo/code/1910/

> Cordialement / Best Regards,
> Christophe BLANCHARD
> 

Best regards, mabri

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to