Re: DICOM to jpg

2015-01-11 Thread Dan Stromberg
On Sun, Jan 11, 2015 at 5:01 AM, Abdul Abdul wrote: > Hello, > > Is there a way to convert a DICOM file to an image using Python? > > Thanks. Does GDCM do what you need? http://gdcm.sourceforge.net/wiki/index.php/Main_Page -- https://mail.python.org/mailman/listinfo/python-list

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-11 Thread Dave Angel
On 01/11/2015 02:41 PM, semeon.ri...@gmail.com wrote: On Saturday, 10 January 2015 21:31:25 UTC-6, Denis McMahon wrote: # using lists of values for length in a: for orientation in b: makeimg(length, orientation) -- Denis McMahon, denismfmcma...@gmail.com The code is working c

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-11 Thread Denis McMahon
On Sun, 11 Jan 2015 11:41:28 -0800, semeon.risom wrote: > The code is working correctly. Thank you! The only change I had to make > was referring to it as a float instead of an integer. > > The images are generating, however I'm noticing that it's making an > image for every possible pair in each

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-11 Thread semeon . risom
On Saturday, 10 January 2015 21:31:25 UTC-6, Denis McMahon wrote: > On Fri, 09 Jan 2015 09:49:25 -0800, semeon.risom wrote: > > > Thank you for the help btw. I think I'm close to a solution, but I'm > > having issue feeding the coordinates from my csv file into the formula. > > > > This is the e

DICOM to jpg

2015-01-11 Thread Abdul Abdul
Hello, Is there a way to convert a DICOM file to an image using Python? Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-10 Thread Denis McMahon
On Fri, 09 Jan 2015 09:49:25 -0800, semeon.risom wrote: > Thank you for the help btw. I think I'm close to a solution, but I'm > having issue feeding the coordinates from my csv file into the formula. > > This is the error I get: > Traceback (most recent call last): > File "C:\Users\Owner\Deskt

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-09 Thread Mark Lawrence
On 09/01/2015 21:51, semeon.ri...@gmail.com wrote: [As per Dave Angel snip all the double spaced nonsence] Please access this list via https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-09 Thread Dan Sommers
> Unfortunately getting a new error. > > Traceback (most recent call last): > File "C:\Users\Owner\Desktop\Stimuli Generation\Coordinates\Generate_w > corr.py", line 68, in > makeimg(length, orientation) > File "C:\Users\Owner\Desktop\Stimuli Generation\Coordinates\Generate_w > corr.py

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-09 Thread Dave Angel
On 01/09/2015 04:51 PM, semeon.ri...@gmail.com wrote: On Friday, 9 January 2015 12:18:46 UTC-6, Joel Goldstick wrote: On Fri, Jan 9, 2015 at 12:49 PM, wrote: (double-spaced nonsense mostly trimmed) i = 0 a = [] b = [] What are a and b supposed to contain? Please use more informative

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-09 Thread semeon . risom
t))) > > >     x2 = int(400 + (-radius * math.cos(orient))) > > >     y2 = int(400 - (-radius * math.sin(orient))) > > > > > >     # create an image > > >     img = Image.new('RGB', (800,800), 'rgb(255, 255, 255)') > > >     #

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-09 Thread Joel Goldstick
ient))) > > y2 = int(400 - (-radius * math.sin(orient))) > > > > # create an image > > img = Image.new('RGB', (800,800), 'rgb(255, 255, 255)') > > # create a draw interface > > draw = ImageDraw.Draw(img) > > > >

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-09 Thread semeon . risom
t(400 + (-radius * math.cos(orient))) > y2 = int(400 - (-radius * math.sin(orient))) > > # create an image > img = Image.new('RGB', (800,800), 'rgb(255, 255, 255)') > # create a draw interface > draw = ImageDraw.Draw(img) > >

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-08 Thread Denis McMahon
.line([(x1, y1), (x2, y2)], fill='rgb(0, 0, 0)', width=4) # determine file name, save image file fn = 'imgs/image_{:03d}_{:03d}.jpg'.format(length,orientation) img.save(fn) # stepping through ranges of values for length in range(100, 601, 100): for orientation in

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-08 Thread Denis McMahon
On Thu, 08 Jan 2015 09:09:18 -0800, semeon.risom wrote: > Simple question. I hope. . We just covered this in the PHP newsgroup where you were trying to use a PHP library to generate these images. As your library code is written in PHP, I suggest you return to the discussion there unless yo

Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-08 Thread semeon . risom
Hello - Simple question. I hope. I have 600 images (jpg) I am trying to generate. Each image will be made up of a line, with specific orientation (degrees) and length values (pixel). The background will be white (rgb: 255,255,255). I'm hoping each will have a name that corresponds to

Re: Create thumbnail image (jpg/png) of PDF file using Python

2012-06-16 Thread Chris Angelico
On Fri, Jun 15, 2012 at 9:15 AM, Dennis Lee Bieber wrote: >        PDF is not an "image" file format; it is a "program" describing how > to render each page. Some of the page contents can be image bitmap data, > but a "proper" PDF has text AS text. Plus,

Re: Create thumbnail image (jpg/png) of PDF file using Python

2012-06-14 Thread golfshoe
r any help! > > I think I've solved this problem using a piece of software called > imageMagick. Good stuff so it is. Interesting. I wonder if GS can be used to convert PDF To JPG and JPG back to PDF? Pillow is a better alternative to PIL if you are in need of compiling on a Mac.

Re: check whether a JPG is completed?

2008-12-20 Thread M�ta-MCI (MVP)
Hi! Sometimes, PIL give an error. With "try: Except:", you can get info. Sometimes, non error, but the Jpeg is not correct. Difficult, in this case, to get info. Therefore, the answer is: "not in all cases". @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-li

check whether a JPG is completed?

2008-12-20 Thread oyster
there are some pics(most of them are JPGs) on my disk, but some are not completed, that is to say, if I view it in irfanview, the bottom is displayed as a gray block. so I want to check where they are completed. but how to do that in python? (No, I am not saying "how to tell the fileszie when I do

Re: How to read a jpg bytearray from a Flash AS3 file

2008-10-02 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >Thanks! I'm using form = cgi.FieldStorage(). When I print out the >contents of form, I get this: > >FieldStorage(None, None, '\xff\xd8\xff\xe0\x00\x10JFIF >\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb >\x00\x84\x00\x05\x03\x04\x04\x04\x03\x05\x04\x04\x04\x05\x05\

Re: How to read a jpg bytearray from a Flash AS3 file

2008-09-28 Thread rsgalloway
Thanks! I'm using form = cgi.FieldStorage(). When I print out the contents of form, I get this: FieldStorage(None, None, '\xff\xd8\xff\xe0\x00\x10JFIF \x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb \x00\x84\x00\x05\x03\x04\x04\x04\x03\x05\x04\x04\x04\x05\x05\x05\x06\x07\x0c \x08\x07\x07\x07

Re: How to read a jpg bytearray from a Flash AS3 file

2008-09-27 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I'm trying to save an image from a Flash AS3 to my server as a jpg file. I found some PHP code to do this, but I want to do this in Python. I'm not quite sure how to convert the following code to Python. It's mainly the $GLOBALS["HTTP_RAW_POST_DATA

Re: How to read a jpg bytearray from a Flash AS3 file

2008-09-26 Thread Kay Schluehr
On 26 Sep., 08:47, [EMAIL PROTECTED] wrote: > I'm trying to save an image from a Flash AS3 to my server as a jpg > file. I found some PHP code to do this, but I want to do this in > Python. I'd expect you use AS3 to save the image file ( just looking at Adobes AS3 docs on h

How to read a jpg bytearray from a Flash AS3 file

2008-09-25 Thread rsgalloway
I'm trying to save an image from a Flash AS3 to my server as a jpg file. I found some PHP code to do this, but I want to do this in Python. I'm not quite sure how to convert the following code to Python. It's mainly the $GLOBALS["HTTP_RAW_POST_DATA"] part I don't

Re: tkinter, loading image error, TclError: couldn't recognize data in image file "C:/users/me/desktop/images/blob4.jpg"

2008-06-30 Thread Eric Brunel
On Sun, 29 Jun 2008 13:34:37 +0200, defn noob <[EMAIL PROTECTED]> wrote: from Tkinter import * import os master = Tk() w = Canvas(master, width=800, height=600) print os.path.exists('C:/me/saftarn/desktop/images/blob4.jpg') im = PhotoImage(file = 'C:/users/saftarn/des

Re: tkinter, loading image error, TclError: couldn't recognize data in image file "C:/users/me/desktop/images/blob4.jpg"

2008-06-29 Thread Terry Reedy
defn noob wrote: from Tkinter import * import os master = Tk() w = Canvas(master, width=800, height=600) print os.path.exists('C:/me/saftarn/desktop/images/blob4.jpg') im = PhotoImage(file = 'C:/users/saftarn/desktop/images/blob4.jpg') #im = file = 'C:/users/me/desk

tkinter, loading image error, TclError: couldn't recognize data in image file "C:/users/me/desktop/images/blob4.jpg"

2008-06-29 Thread defn noob
from Tkinter import * import os master = Tk() w = Canvas(master, width=800, height=600) print os.path.exists('C:/me/saftarn/desktop/images/blob4.jpg') im = PhotoImage(file = 'C:/users/saftarn/desktop/images/blob4.jpg') #im = file = 'C:/users/me/desktop/images/blob4.jp

Re: Create thumbnail image (jpg/png) of PDF file using Python

2007-11-21 Thread sophie_newbie
On Nov 20, 5:36 pm, sophie_newbie <[EMAIL PROTECTED]> wrote: > Is there any way to do this directly within python? > > If not is there any other good way to achieve it? > > Thanks in advance for any help! I think I've solved this problem using a piece of software called imageMagick. Good stuff so

Re: Create thumbnail image (jpg/png) of PDF file using Python

2007-11-20 Thread [EMAIL PROTECTED]
On Nov 20, 11:36 am, sophie_newbie <[EMAIL PROTECTED]> wrote: > Is there any way to do this directly within python? > > If not is there any other good way to achieve it? > > Thanks in advance for any help! Take a look at PIL -- http://www.pythonware.com/products/pil/. Among other things, it allow

Re: Create thumbnail image (jpg/png) of PDF file using Python

2007-11-20 Thread Robin Becker
sophie_newbie wrote: > Is there any way to do this directly within python? > > If not is there any other good way to achieve it? > > Thanks in advance for any help! I have used ghostscript from within python to do this sort of thing. You may get problems if the fonts are too exotic, but otherw

Create thumbnail image (jpg/png) of PDF file using Python

2007-11-20 Thread sophie_newbie
Is there any way to do this directly within python? If not is there any other good way to achieve it? Thanks in advance for any help! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to save High Quality JPG image by setting Image module from PIL

2006-09-25 Thread Fredrik Lundh
Daniel Mark wrote: > I am using Image module from PIL to save created image as JPG format. > > Is there any option I could set for function Image.save so that the > stored image will have the highest quality. something like im.save(filename, quality=90) should do the trick.

How to save High Quality JPG image by setting Image module from PIL

2006-09-25 Thread Daniel Mark
hello all: I am using Image module from PIL to save created image as JPG format. Is there any option I could set for function Image.save so that the stored image will have the highest quality. Thank you -Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Download .jpg from web

2006-06-07 Thread Mark rainess
GMane Python wrote: > Hello All. > Using a network camera with built-in webserver, I'd like to have a python > program download .jpg files on a local lan. the location is > http:///jpg/image.jpg. > > Currently, I'm importing urllib and using urlopen to the a

Re: send pdf or jpg to printer

2006-04-19 Thread Grant Edwards
On 2006-04-19, Bell, Kevin <[EMAIL PROTECTED]> wrote: > Does anyone have any suggestions on printing pdf's? This works for me: os.system("lpr filename.pdf") ;) > These pdf's don't change much, so if it be more straight > forward to convert them to jpgs, or another format, then > that'd be fi

Re: send pdf or jpg to printer

2006-04-19 Thread Serge Orlov
Bell, Kevin wrote: > Does anyone have any suggestions on printing pdf's? These pdf's don't > change much, so if it be more straight forward to convert them to jpgs, > or another format, then that'd be fine too. You didn't say what OS you're using, assuming it's windows: http://tgolden.sc.sabren.

Re: send pdf or jpg to printer

2006-04-19 Thread infidel
Bell, Kevin wrote: > Does anyone have any suggestions on printing pdf's? These pdf's don't > change much, so if it be more straight forward to convert them to jpgs, > or another format, then that'd be fine too. I use GhostScript and GSPrint to send PDFs to our printer in a Windows environment. I

send pdf or jpg to printer

2006-04-19 Thread Bell, Kevin
Does anyone have any suggestions on printing pdf's? These pdf's don't change much, so if it be more straight forward to convert them to jpgs, or another format, then that'd be fine too. Thanks in advanced, Kevin -- http://mail.python.org/mailman/listinfo/python-list

how to handle jpg images with Tkinter

2006-01-16 Thread K Satish
Hi,   I am not able to load jpg images in photoimage widget. That is showing different different errors. can I find any examples on internet.   Thanks, SatishSend instant messages to your online friends http://in.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Jpg

2005-10-28 Thread Juho Schultz
Tuvas wrote: > I am building a GUI interface at the moment, and would like to have > support for displaying a jpg file, and a FITS file if possible. Is > there any way to do this? My interface has been written in Tkinter at > the moment, especially because of it's great portab

Re: Jpg

2005-10-26 Thread c d saunter
Tuvas ([EMAIL PROTECTED]) wrote: : I am building a GUI interface at the moment, and would like to have : support for displaying a jpg file, and a FITS file if possible. Is : there any way to do this? My interface has been written in Tkinter at : the moment, especially because of it's

Jpg

2005-10-26 Thread Tuvas
I am building a GUI interface at the moment, and would like to have support for displaying a jpg file, and a FITS file if possible. Is there any way to do this? My interface has been written in Tkinter at the moment, especially because of it's great portability, I wouldn't have to i

Re: converting jpg to pdf

2005-05-26 Thread Larry Bates
You use PIL (Python Imaging Library) if you want simple conversion or ReportLab if you want to combine several along with text, etc. -larry Raghul wrote: > Hi friends > Is it possible to convert jpg to pdf in python. I need a > program to convert jpg format file to pdf. Is

Re: converting jpg to pdf

2005-05-26 Thread Thomas Guettler
Am Thu, 26 May 2005 07:00:21 -0700 schrieb Raghul: > Hi friends > Is it possible to convert jpg to pdf in python. I need a > program to convert jpg format file to pdf. Is there any sample or any > library to do that? Pls guide me. Hi, import os os.system("conver

converting jpg to pdf

2005-05-26 Thread Raghul
Hi friends Is it possible to convert jpg to pdf in python. I need a program to convert jpg format file to pdf. Is there any sample or any library to do that? Pls guide me. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: Download .jpg from web

2005-01-06 Thread Adam DePrince
On Thu, 2005-01-06 at 13:49, GMane Python wrote: > Hello All. > Using a network camera with built-in webserver, I'd like to have a python > program download .jpg files on a local lan. the location is > http:///jpg/image.jpg. > > Currently, I'm importing url

Re: Download .jpg from web

2005-01-06 Thread ralobao
You could try using: urlllib.urlretrieve ...it may be faster. -- http://mail.python.org/mailman/listinfo/python-list

Re: Download .jpg from web

2005-01-06 Thread Istvan Albert
GMane Python wrote: Using a network camera with built-in webserver The first thing that might be worth investigating is this webserver. What kind of throughput is it capable of? How does it handle repeated requests etc. Your program won't be faster than the server that provides it with the data.

Download .jpg from web

2005-01-06 Thread GMane Python
Hello All. Using a network camera with built-in webserver, I'd like to have a python program download .jpg files on a local lan. the location is http:///jpg/image.jpg. Currently, I'm importing urllib and using urlopen to the address, then read()-ing it, saving it to a binary file.