Image orientation and color information with PIL?

2005-07-18 Thread tvmaly
Does anyone know if it is possible to determine if an image is
horizontal/vertical  and color or black & white using the python image
library?  I have been searching this news group and the information was
not all clear on this.

Best Regards 

Ty

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Image orientation and color information with PIL?

2005-07-20 Thread tvmaly
Jeff, this was exactly what I was looking for.  I wrote a script with
this code and it worked perfectly.

  Thanks 

 Ty

-- 
http://mail.python.org/mailman/listinfo/python-list


Creating watermark with transparency on jpeg using PIL?

2005-08-18 Thread tvmaly
I have been trying to add a watermark to a jpeg using PIL, but the
watermark has a black box around it.  I looked at

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362879

and

http://mail.python.org/pipermail/python-list/1999-May/003369.html

but I think these only refer to gif or png.  I know jpegs really do not
support transparency, but is there some way to take a watermark in a
non jpeg format and add it to a jpeg without that box appearing around
it?

Best Regards

   Ty

-- 
http://mail.python.org/mailman/listinfo/python-list


need help with nullmailer-inject in python cgi script to send attachements ?

2005-03-24 Thread tvmaly
Due to the restrictions I have at my host, I cannot use smtplib in my
email cgi script.  They gave me a script they use that calls
nullmailer-inject.   I am trying to figure out how to add the ability
to send attachments via the nullmailer-inject call.  I could not find
much documentation on google about nullmailer.  Has anyone used it
before to send attachments?   Here is function  I have so far that
sends a regular email.  The variables like recipient are set from a cgi
in another part of the script.

 thanks

 Ty

def genmail(reql):
  if nosend: return
  recip=recipient
  cap=form.keys()
  cap.sort()
  mailfl=os.popen('/usr/bin/nullmailer-inject -f '+fromaddr,'w')
  mailfl.write('To: '+recipient+nl)
  if fromaddr: mailfl.write('From: '+fromaddr+nl)
  mailfl.write('Subject: %s%s\n\n'%(subject,uri))
  mailfl.write(intro)
  rx=0
  prev=''
  for x in cap:
while (rxprev:
putln(reql[rx],mailfl)
  rx=rx+1
putln(x,mailfl)
prev=x

  for x in envl:
mailfl.write('%s: %s\n'%(x,env[x]))
  mailfl.close()

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: need help with nullmailer-inject in python cgi script to send attachements ?

2005-03-24 Thread tvmaly
Thank you Denis

  Ty

-- 
http://mail.python.org/mailman/listinfo/python-list