Problems getting a png image with ZnEasy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems getting a png image with ZnEasy

Offray
Hi all,

When I try to do:

~~~
ZnEasy getPng:
'https://pbs.twimg.com/profile_images/3179579549/f83f0e935fb5eff6d967e37e1a3efe5c_normal.png'
~~~

I get "MessageNotUnderstood: receiver of "bitShift:" is nil". Still I
can browse the image in the web browser.

Any hints?

Cheers,

Offray

Reply | Threaded
Open this post in threaded view
|

Re: Problems getting a png image with ZnEasy

Sven Van Caekenberghe-2

> On 16 May 2015, at 03:15, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
>
> Hi all,
>
> When I try to do:
>
> ~~~
> ZnEasy getPng: 'https://pbs.twimg.com/profile_images/3179579549/f83f0e935fb5eff6d967e37e1a3efe5c_normal.png'
> ~~~
>
> I get "MessageNotUnderstood: receiver of "bitShift:" is nil". Still I can browse the image in the web browser.
>
> Any hints?

I don't know, for some reason Pharo cannot read that particular PNG. Consider:

'https://pbs.twimg.com/profile_images/3179579549/f83f0e935fb5eff6d967e37e1a3efe5c_normal.png' asUrl saveContentsToFile: 'foo.png'.

$ open current/foo.png

ImageReadWriter formFromFileNamed: 'foo.png'

$ file current/foo.png
current/foo.png: PNG image data, 48 x 48, 8-bit/color RGBA, non-interlaced

> Cheers,
>
> Offray
>


Reply | Threaded
Open this post in threaded view
|

Re: Problems getting a png image with ZnEasy

Offray
Hi Sven,

Thanks for your quick answer. It seems that the problem is related with
encoding errors on the images. I download them (with ZnClient #get), try
to preview them using "FileSystem disk" navigation facilities and get
the same error, but after converting and then with "convert" from Unix
command shell (event without changing the file extension) I was able to
preview them. I'm planning now to make some preprocessing of the image
to warranty it opens fine.

Cheers,

Offray

El 16/05/15 a las 13:27, Sven Van Caekenberghe escribió:

>
>> On 16 May 2015, at 03:15, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
>>
>> Hi all,
>>
>> When I try to do:
>>
>> ~~~
>> ZnEasy getPng: 'https://pbs.twimg.com/profile_images/3179579549/f83f0e935fb5eff6d967e37e1a3efe5c_normal.png'
>> ~~~
>>
>> I get "MessageNotUnderstood: receiver of "bitShift:" is nil". Still I can browse the image in the web browser.
>>
>> Any hints?
>
> I don't know, for some reason Pharo cannot read that particular PNG. Consider:
>
> 'https://pbs.twimg.com/profile_images/3179579549/f83f0e935fb5eff6d967e37e1a3efe5c_normal.png' asUrl saveContentsToFile: 'foo.png'.
>
> $ open current/foo.png
>
> ImageReadWriter formFromFileNamed: 'foo.png'
>
> $ file current/foo.png
> current/foo.png: PNG image data, 48 x 48, 8-bit/color RGBA, non-interlaced
>
>> Cheers,
>>
>> Offray
>>
>
>
>