Re: Why my image is in bad quality ?

2015-12-17 Thread fsn761304
On Thursday, December 17, 2015 at 5:27:28 AM UTC+4, Nobody wrote: > On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote: > > > pixbufObj = Gdk.pixbuf_get_from_window(window, x, y, width, height) ... > > image = Image.frombuffer("RGB", (width, height), > >

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
...here is the bad image: http://wikisend.com/download/748118/saved.png -- https://mail.python.org/mailman/listinfo/python-list

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 8:41:23 PM UTC+4, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 3:33 AM, wrote: > > On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: > >> On Thu, Dec 17, 2015 at 1:21 AM, wrote: > >> > I

Re: Why my image is in bad quality ?

2015-12-16 Thread BartC
On 16/12/2015 17:17, fsn761...@gmail.com wrote: ...here is the bad image: http://wikisend.com/download/748118/saved.png This is 3000x600 pixels; what was the original size? (150x30?) What does the original look like? You need to test step by step to see at what point it goes wrong. You're

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Thursday, December 17, 2015 at 1:36:55 AM UTC+4, BartC wrote: > On 16/12/2015 17:17, fsn761...@gmail.com wrote: > > ...here is the bad image: http://wikisend.com/download/748118/saved.png > > > > This is 3000x600 pixels; what was the original size? (150x30?) > > What does the original look

Re: Why my image is in bad quality ?

2015-12-16 Thread BartC
On 16/12/2015 21:53, fsn761...@gmail.com wrote: On Thursday, December 17, 2015 at 1:36:55 AM UTC+4, BartC wrote: You need to test step by step to see at what point it goes wrong. You're scaling by 20 (which is a massive amount); what happens when scaling by 1? And anti-alias is turned off?

Re: Why my image is in bad quality ?

2015-12-16 Thread Nobody
On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote: > pixbufObj = Gdk.pixbuf_get_from_window(window, x, y, width, height) ... > image = Image.frombuffer("RGB", (width, height), > pixbufObj.get_pixels(), 'raw', 'RGB', 0, 1) The second-to-last argument should

Why my image is in bad quality ?

2015-12-16 Thread fsn761304
I'm trying to make OCR-recognition on a screenshot, after screenshot taken it goes to pibxbuffer, which content goes to pytesseract. But after using pixbuffer image quality is bad (I tried to save it in a directory, instead of pixbuffer, and looked at it). Below is the problematic snippets of

Re: Why my image is in bad quality ?

2015-12-16 Thread Denis McMahon
On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote: > I'm trying to make OCR-recognition on a screenshot, after screenshot > taken it goes to pibxbuffer, which content goes to pytesseract. > But after using pixbuffer image quality is bad > image = image.resize((width*20,height*20),

Re: Why my image is in bad quality ?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 1:21 AM, wrote: > I tried also another code (see below) and without scaling by 20 quality of > recognition was very bad. > > from pytesseract import image_to_string > from PIL import Image > > im = Image.open("screen.png") > print(im) > im =

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 6:18:00 PM UTC+4, Denis McMahon wrote: > On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote: > > > I'm trying to make OCR-recognition on a screenshot, after screenshot > > taken it goes to pibxbuffer, which content goes to pytesseract. > > But after using

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 1:21 AM, wrote: > > I tried also another code (see below) and without scaling by 20 quality of > > recognition was very bad. > > > > from pytesseract import image_to_string

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 8:34:15 PM UTC+4, fsn7...@gmail.com wrote: > On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: > > On Thu, Dec 17, 2015 at 1:21 AM, wrote: > > > I tried also another code (see below) and without scaling by 20

Re: Why my image is in bad quality ?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 3:33 AM, wrote: > On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: >> On Thu, Dec 17, 2015 at 1:21 AM, wrote: >> > I tried also another code (see below) and without scaling by 20 quality of >> >