You can write a custom show method to your plugins:<div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>def show(self):</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>path = "/home/adys/.cache/%s.png" % "tmpVfBc3s"</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>self.save(path)</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>import os</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>os.popen("eog %s" % path)</div></div><div><br clear="all">J. Leclanche / Adys<br>
<br><br><div class="gmail_quote">On Fri, Jan 8, 2010 at 11:08 PM, Suresh Kumar <span dir="ltr"><<a href="mailto:suresh.amritapuri@gmail.com">suresh.amritapuri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi<br>
<br>
Thanks. Though not mentioned in the PIL 1.1.6 documentation, I see<br>
from (sys.path)/PIL/Image.py that it can be done. But I have just one<br>
more qn. Is it possible to modify _showxv() without altering the<br>
original code of PIL ?<br>
<font color="#888888"><br>
suresh<br>
</font><div><div></div><div class="h5"><br>
On Fri, Jan 8, 2010 at 1:00 PM, Jerome Leclanche <<a href="mailto:adys.wh@gmail.com">adys.wh@gmail.com</a>> wrote:<br>
> In recent versions of PIL you can do img.show(command="display %s") or<br>
> something similar (maybe without %s). Otherwise, edit _showxv in<br>
> (sys.path)/PIL/Image.py<br>
> J. Leclanche / Adys<br>
><br>
><br>
> On Fri, Jan 8, 2010 at 10:49 PM, Suresh Kumar <<a href="mailto:suresh.amritapuri@gmail.com">suresh.amritapuri@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> How do you do that? Can you elaborate a bit further?<br>
>><br>
>> suresh<br>
>><br>
>><br>
>> On Fri, Jan 8, 2010 at 12:39 PM, Jerome Leclanche <<a href="mailto:adys.wh@gmail.com">adys.wh@gmail.com</a>><br>
>> wrote:<br>
>> > I'm pretty sure it's a bug in Eye of Gnome. Have you tried hardcoding<br>
>> > another program in PIL/Image.py ? (_showxv, iirc)<br>
>> > J. Leclanche / Adys<br>
>> ><br>
>> ><br>
>> > On Fri, Jan 8, 2010 at 10:18 PM, Suresh Kumar<br>
>> > <<a href="mailto:suresh.amritapuri@gmail.com">suresh.amritapuri@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Hi<br>
>> >><br>
>> >> Thanks for the reply.<br>
>> >><br>
>> >> With one file, it is working correctly. Now I get the following error<br>
>> >> messages which are different from earlier "file not found ones".<br>
>> >><br>
>> >> (eog:8368): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion<br>
>> >> `path->depth > 0' failed<br>
>> >><br>
>> >> (eog:8368): Gtk-CRITICAL **: gtk_list_store_get_value: assertion<br>
>> >> `VALID_ITER (iter, list_store)' failed<br>
>> >><br>
>> >> (eog:8368): GLib-GObject-WARNING **:<br>
>> >> /build/buildd/glib2.0-2.20.1/gobject/gtype.c:3940: type id `0' is<br>
>> >> invalid<br>
>> >><br>
>> >> (eog:8368): GLib-GObject-WARNING **: can't peek value table for type<br>
>> >> `<invalid>' which is not currently referenced<br>
>> >> Segmentation fault<br>
>> >><br>
>> >> So any suggestions?<br>
>> >> my code:<br>
>> >><br>
>> >><br>
>> >> -----------------------------------------------------------------------------------------<br>
>> >> #!/usr/bin/python<br>
>> >> print "Aum Amriteshwaryai Namaha"<br>
>> >><br>
>> >> import Image<br>
>> >><br>
>> >> imagePath = "/home/suresh/EE241/book_images_3ed/ch03/"<br>
>> >><br>
>> >> im34 = Image.open(imagePath + "breast_digital_Xray.tif")<br>
>> >> im35 = Image.open(imagePath + "DFT_no_log.tif")<br>
>> >> im35.show()<br>
>> >><br>
>> >> def neg(x):<br>
>> >> return 255-1-x<br>
>> >><br>
>> >> import math<br>
>> >><br>
>> >> def logtr(x):<br>
>> >> y = math.log(1+x,10)<br>
>> >> print y<br>
>> >> return y*100<br>
>> >><br>
>> >> im34x = im34.point(neg)<br>
>> >> im34x.show()<br>
>> >><br>
>> >> im35x = im35.point(logtr)<br>
>> >> im35x.show()<br>
>> >><br>
>> >> ----------------------------------------------end of<br>
>> >> code--------------------------------<br>
>> >> suresh<br>
>> >><br>
>> >><br>
>> >> On Fri, Jan 8, 2010 at 5:29 AM, Bram Mertens <<a href="mailto:mertensb.mazda@gmail.com">mertensb.mazda@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > On Fri, Jan 8, 2010 at 1:14 AM, suresh.amritapuri<br>
>> >> > <<a href="mailto:suresh.amritapuri@gmail.com">suresh.amritapuri@gmail.com</a>> wrote:<br>
>> >> >> Hi<br>
>> >> >><br>
>> >> >> I am using PIL for image processing in ubuntu 9.04. When i give two<br>
>> >> >> im.show() commands for two different images, the second image is not<br>
>> >> >> displayed (eye of gnome is the display program). It says no such<br>
>> >> >> file<br>
>> >> >> or directory. Any ideas?<br>
>> >> ><br>
>> >> > Have you verified that the path to the second image is correct and<br>
>> >> > that the image is readable by your script?<br>
>> >> ><br>
>> >> > e.g. try reversing the order of the images to identify whether or not<br>
>> >> > it is the image that can not be found or eog.<br>
>> >> ><br>
>> >> > Another approach might be to check the file using the os module or<br>
>> >> > something similar.<br>
>> >> ><br>
>> >> > Regards<br>
>> >> ><br>
>> >> > Bram<br>
>> >> ><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> R Suresh Kumar,<br>
>> >> Phd Student, Vislab<br>
>> >> EE, Univ. of California<br>
>> >> Riverside, CA 92507<br>
>> >> --<br>
>> >> Even after all this time The sun never says to the earth, "You owe Me."<br>
>> >> Look what happens with A love like that, It lights the Whole Sky.<br>
>> >> - Hafiz e Shirazi<br>
>> >> _______________________________________________<br>
>> >> Image-SIG maillist - <a href="mailto:Image-SIG@python.org">Image-SIG@python.org</a><br>
>> >> <a href="http://mail.python.org/mailman/listinfo/image-sig" target="_blank">http://mail.python.org/mailman/listinfo/image-sig</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> R Suresh Kumar,<br>
>> Phd Student, Vislab<br>
>> EE, Univ. of California<br>
>> Riverside, CA 92507<br>
>> --<br>
>> Even after all this time The sun never says to the earth, "You owe Me."<br>
>> Look what happens with A love like that, It lights the Whole Sky.<br>
>> - Hafiz e Shirazi<br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">R Suresh Kumar,<br>
Phd Student, Vislab<br>
EE, Univ. of California<br>
Riverside, CA 92507<br>
--<br>
Even after all this time The sun never says to the earth, "You owe Me."<br>
Look what happens with A love like that, It lights the Whole Sky.<br>
- Hafiz e Shirazi<br>
</div></div></blockquote></div><br></div>