Re: [patch 1/1] dlls/windowscodecs/pngformat.c: implemented 'PngDecoder_Block_GetCount'

2012-10-05 Thread Vincent Povirk
You should take a look at the PNG format spec, particularly the part
about chunks: http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html

I believe what's needed here is to return all ancillary chunks.




Re: [patch 1/1] dlls/windowscodecs/pngformat.c: implemented 'PngDecoder_Block_GetCount'

2012-10-05 Thread Max TenEyck Woodbury
On 10/05/2012 03:55 AM, Nikolay Sivov wrote:
> On 10/5/2012 06:43, max+...@mtew.isa-geek.net wrote:
>> From: Max TenEyck Woodbury 
>>
>> ---
>>   dlls/windowscodecs/pngformat.c |6 --
>>   1 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/dlls/windowscodecs/pngformat.c
>> b/dlls/windowscodecs/pngformat.c
>> index 686f9c6..e8e7cbe 100644
>> --- a/dlls/windowscodecs/pngformat.c
>> +++ b/dlls/windowscodecs/pngformat.c
>> @@ -899,8 +899,10 @@ static HRESULT WINAPI
>> PngDecoder_Block_GetContainerFormat(IWICMetadataBlockReade
>>   static HRESULT WINAPI
>> PngDecoder_Block_GetCount(IWICMetadataBlockReader *iface,
>>   UINT *pcCount)
>>   {
>> -FIXME("%p,%p: stub\n", iface, pcCount);
>> -return E_NOTIMPL;
>> +PngDecoder *This = impl_from_IWICMetadataBlockReader(iface);
>> +if (!pcCount) return E_INVALIDARG;
>> +*pcCount = This->ref;
>> +return S_OK;
>>   }
>> static HRESULT WINAPI
>> PngDecoder_Block_GetReaderByIndex(IWICMetadataBlockReader *iface,
> Return reference count as block count?
> 

I've screwed up. This is NOT what is supposed to be returned here. I am
in the process of digging out what this really should be.  Please do
NOT apply this patch!  (However, it does trigger at least one app to
do something useful and reveals the need for other changes...)




Re: [patch 1/1] dlls/windowscodecs/pngformat.c: implemented 'PngDecoder_Block_GetCount'

2012-10-05 Thread Nikolay Sivov

On 10/5/2012 06:43, max+...@mtew.isa-geek.net wrote:

From: Max TenEyck Woodbury 

---
  dlls/windowscodecs/pngformat.c |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c
index 686f9c6..e8e7cbe 100644
--- a/dlls/windowscodecs/pngformat.c
+++ b/dlls/windowscodecs/pngformat.c
@@ -899,8 +899,10 @@ static HRESULT WINAPI 
PngDecoder_Block_GetContainerFormat(IWICMetadataBlockReade
  static HRESULT WINAPI PngDecoder_Block_GetCount(IWICMetadataBlockReader 
*iface,
  UINT *pcCount)
  {
-FIXME("%p,%p: stub\n", iface, pcCount);
-return E_NOTIMPL;
+PngDecoder *This = impl_from_IWICMetadataBlockReader(iface);
+if (!pcCount) return E_INVALIDARG;
+*pcCount = This->ref;
+return S_OK;
  }
  
  static HRESULT WINAPI PngDecoder_Block_GetReaderByIndex(IWICMetadataBlockReader *iface,

Return reference count as block count?