After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322789 - Cannot select an image smaller than 1KB for contact
Cannot select an image smaller than 1KB for contact
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
pre-1.5 (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2005-11-29 23:54 UTC by Andrew Jorgensen
Modified: 2013-09-10 14:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Example of an image that won't load (870 bytes, image/jpeg)
2005-11-30 03:15 UTC, Andrew Jorgensen
  Details
Committed patch. (1.24 KB, patch)
2006-02-24 05:42 UTC, Srinivasa Ragavan
committed Details | Review

Description Andrew Jorgensen 2005-11-29 23:54:58 UTC
Please describe the problem:
I am unable to select a very small jpg image (<1KB) for a contact in the address
book.  Images larger than about 1KB work fine.

Steps to reproduce:
1. Create a JPG that is around 800B (compress really low, for example).
2. Try to select this image as the image for a contact.

Actual results:
The goatee man icon is selected.  Not even just no image, it's the goatee man
himself.

Expected results:
The selected image should be selected.

Does this happen every time?
Yes

Other information:
Ubuntu 5.10 (breezy) x86
Comment 1 André Klapper 2005-11-30 01:40:56 UTC
hi,
thanks for reporting this.

hmm... if you do this after starting evolution from the shell, is there any
valuable output?

and... i really ask myself: is this useful to be fixed? when at all do people
use such small images?

setting to NEEDINFO, please REOPEN when answering. thanks. :-)
Comment 2 Andrew Jorgensen 2005-11-30 03:15:27 UTC
Created attachment 55400 [details]
Example of an image that won't load

72x96 jpg at 25% compression.
Comment 3 Andrew Jorgensen 2005-11-30 03:18:28 UTC
There's absolutely no output on the commandline, just fails silently.  I'd be
happy to set some debug variable if you'd like.

It's true that images might rarely be smaller than 1KB, but it's not
unreasonable either.  Considering that one might export a vCard file it's
desirable to have the image be as small as possible.
Comment 4 André Klapper 2005-12-01 12:02:18 UTC
andrew, it works perfectly here, you're image is used like a charm. running
unstable evolution 2.5.2. so i cannot reproduce it.
which evolution version do you use exactly?
Comment 5 Andrew Jorgensen 2005-12-01 16:15:40 UTC
evolution 2.4.1
gnome 2.12.1

This is a standard Ubuntu install + updates + official backports.  Could be a
distro bug, or a gtk or gnome bug.

I'll be setting up Ubuntu's pre-release (dapper) sometime soon to try some other
bugs.  When I do I'll try this one as well.

BTW: Behavior is the same whether I use the file chooser or drag-and-drop.
Comment 6 Andrew Jorgensen 2005-12-01 18:27:42 UTC
I just tried it on evo 2.5.2 on dapper.  It's broken there too.  I'll report the
bug downstream.
Comment 7 André Klapper 2005-12-02 13:37:28 UTC
ok, setting to NEEDINFO. would be cool if you could add the link to the ubuntu
bug. thanks in advance.
forgot to mention my distro, it's suse9.3.
Comment 8 Sebastien Bacher 2006-01-07 11:58:35 UTC
Ubuntu bug about that: http://bugzilla.ubuntu.com/show_bug.cgi?id=20352

evolution prints that when trying to set a small image to as a contact picture:
"e-utils-WARNING **: calling e_icon_factory_get_icon_filename with unknown icon_size value (48)"
Comment 9 Srinivasa Ragavan 2006-01-09 07:40:13 UTC
that warning is nothing to do with this. The bug is...

e-image-chooser.c:set_image_from_data (EImageChooser *chooser,
		     char *data, int length)
{
	gboolean rv = FALSE;
	GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
	GdkPixbuf *pixbuf;

	gdk_pixbuf_loader_write (loader, data, length, NULL);

	pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);


This pixbuf is null and the loader return true and the error is also null, when i printed. To me Looks like a Gdk bug.
Comment 10 Devashish Sharma 2006-01-31 04:45:46 UTC
Works for me on evolution 2.4.0 (suse 93) and 2.5.5 (suse10).
Is this a problem with some specifis gdk-pixbuf version.
I have tested this with 2.6.4 and 2.8.3 version of gdkpixbuf.
Can you check which version of gdkpixbuf you are using.
Comment 11 Devashish Sharma 2006-01-31 05:03:32 UTC
Definitely a gdkpixbuf Bug , see http://bugzilla.gnome.org/show_bug.cgi?id=324667.

Comment 12 Karsten Bräckelmann 2006-02-23 02:30:54 UTC
Can confirm this bug with Evo 2.5.91, gtk+ 2.8.12, GNOME 2.13.91.

Additional information:
After selecting the picture in comment 2, Evo *does* display an image in the preview. However, this is *not* the desired one. Strangely, the placeholder image is displayed -- the very same as in the Contect Editor with no image.

REOPENing. This definitely is not needinfo.


I don't know if this is an Evolution or GTK+ bug. Feel free to move over to the appropriate Product, if you are sure. However, please note the additional info above about the "wrong image being displayed", before doing so.

Another note: A GTK+ issue might explain, why this is not an issue on SuSE 9.3 (as Andre uses), which ships with GNOME 2.10.x...
Comment 13 Devashish Sharma 2006-02-23 04:22:18 UTC
ok, moving it to gtk, as it definitely is not an evolution issue.
Comment 14 Matthias Clasen 2006-02-24 00:38:17 UTC
It is an evolution issue. Look at the bug cited in comment 11
Comment 15 Andrew Jorgensen 2006-02-24 00:52:34 UTC
For those who don't like to dig links for themselves:

> Oh, I see now what is wrong. You need to call gdk_pixbuf_loader_close() when
you have fed all data to it, then it will work.
Comment 16 Devashish Sharma 2006-02-24 04:05:08 UTC
Dude we are already calling gdk_pixbuf_loader_close.

loader=gdk_pixbuf_loader_new();
gdk_pixbuf_loader_write(loader,data,len,&err);
pixbuf=gdk_pixbuf_loader_get_pixbuf(loader);
gdk_pixbuf_loader_close(loader, NULL);

I think this is a gdk-pixbuf issue as it is not reproducible consistently.
(It works perfectly for me).
If it had been evolution issue this should have been reproducible consistently.
May be some issue with specific gtk versions, so moving it back to gtk.

Andrew: It was me who put up that bug link in comment 11, and me only moved this bug to gdk-pixbuf. What does that mean, i had looked at the solution given there and it didnt work. We already do whatever was given as a solution for the bug.
So without knowing the whole picture please dont give statements like in comment #15.Thanks.
Comment 17 Srinivasa Ragavan 2006-02-24 05:11:12 UTC
(In reply to comment #16)
> Dude we are already calling gdk_pixbuf_loader_close.
> 
> loader=gdk_pixbuf_loader_new();
> gdk_pixbuf_loader_write(loader,data,len,&err);
> pixbuf=gdk_pixbuf_loader_get_pixbuf(loader);
> gdk_pixbuf_loader_close(loader, NULL);
> 
I guess the order has to be changed.
loader=gdk_pixbuf_loader_new();
gdk_pixbuf_loader_write(loader,data,len,&err);
gdk_pixbuf_loader_close(loader, NULL);
pixbuf=gdk_pixbuf_loader_get_pixbuf(loader);


It works for me now. Ill fix it.

> I think this is a gdk-pixbuf issue as it is not reproducible consistently.
> (It works perfectly for me).
> If it had been evolution issue this should have been reproducible consistently.
> May be some issue with specific gtk versions, so moving it back to gtk.
> 
> Andrew: It was me who put up that bug link in comment 11, and me only moved
> this bug to gdk-pixbuf. What does that mean, i had looked at the solution given
> there and it didnt work. We already do whatever was given as a solution for the
> bug.
> So without knowing the whole picture please dont give statements like in
> comment #15.Thanks.
> 
Comment 18 Srinivasa Ragavan 2006-02-24 05:42:56 UTC
Created attachment 60040 [details] [review]
Committed patch.
Comment 19 Srinivasa Ragavan 2006-02-24 05:45:47 UTC
Fixed to HEAD.