Re: convertDefault.py is broken under python 3

2019-06-05 Thread José Abílio Matos
On Wednesday, 5 June 2019 10.53.55 WEST Jean-Marc Lasgouttes wrote:
> Indeed. This has been fixed by Uwe already, BTW.
> 
> JMarc

You are right. Only yesterday while reviewing I finally noticed that the 
restriction was not there anymore. :-)

I saw that because I was looking into the output of "git annotate" (who am I 
kidding, it was really "git blame") ;-) just to found out (as usual) that I am 
the one to blame. :-D

-- 
José Abílio




Re: convertDefault.py is broken under python 3

2019-06-05 Thread Jean-Marc Lasgouttes

Le 03/06/2019 à 18:45, José Abílio Matos a écrit :

On Monday, 11 February 2019 00.25.41 WEST Uwe Stöhr wrote:

Besides this I don't understand why we limit the depth for image
conversions to 8 bit:
sopts = "-depth 8"


Unless there is a strong reason to limit the conversions to 8 bit I agree with
Uwe.


Indeed. This has been fixed by Uwe already, BTW.

JMarc


Re: convertDefault.py is broken under python 3

2019-06-03 Thread José Abílio Matos
On Monday, 11 February 2019 00.25.41 WEST Uwe Stöhr wrote:
> Besides this I don't understand why we limit the depth for image
> conversions to 8 bit:
> sopts = "-depth 8"

Unless there is a strong reason to limit the conversions to 8 bit I agree with 
Uwe.

Regards,
-- 
José Abílio




Re: convertDefault.py is broken under python 3

2019-06-03 Thread José Abílio Matos
On Thursday, 21 March 2019 01.37.56 WEST Uwe Stöhr wrote:
> Am 18.03.2019 um 02:31 schrieb Scott Kostyshak:
> > Bump. Did we get this figured out?
> 
> Well, the -depth8 restriction for ImageMagick can definitely go and i
> now just did this. Nevertheless convertDefault.py is broken under python
> 3.7.x
> 
> regards Uwe

Hi,
what is the error you get?

I tried to run this using simple files and failed to reproduce it works for 
me.

There was a bug when the output format was ppm that I have fixed meanwhile (I 
found it be accident, because who wants to convert from png to ppm (?) as I 
was testing).

Best regards,
-- 
José Abílio




Re: convertDefault.py is broken under python 3

2019-03-21 Thread José Abílio Matos
On Monday, 11 February 2019 00.25.41 WET Uwe Stöhr wrote:
> Attached is the diff to get it at least to work.
> José, could you please have a look?

I am sorry for not replying before. It is in my todo list as soon as I have 
some free time (from tasks that are urgent and important).

I will take a look into probably at the begin of next week.

Best regards,
-- 
José Abílio




Re: convertDefault.py is broken under python 3

2019-03-20 Thread Uwe Stöhr

Am 18.03.2019 um 02:31 schrieb Scott Kostyshak:


Bump. Did we get this figured out?


Well, the -depth8 restriction for ImageMagick can definitely go and i
now just did this. Nevertheless convertDefault.py is broken under python
3.7.x

regards Uwe


Re: convertDefault.py is broken under python 3

2019-03-18 Thread Guenter Milde
On 2019-03-18, Scott Kostyshak wrote:
> On Mon, Feb 11, 2019 at 01:25:41AM +0100, Uwe Stöhr wrote:
>> Today I tried LyX 2.3.2 with Python 3.7.2 and found that all image
>> conversions failed. I investigated and I found out that this commit
>> introduced the problem:
>> 5b160e82

>> Line 38 fails since there is no .decode() for strings.
>> Also line 35 fails but strangely not line 29.

>> Attached is the diff to get it at least to work.
>> José, could you please have a look?

This was fixed on  Feb 28 in 9abd46b4d5056d11e4b.

>> Besides this I don't understand why we limit the depth for image
>> conversions to 8 bit:
>> sopts = "-depth 8"

>> I cannot see a reason for this limitation. So if there is no longer one,
>> sopts should be kept empty in line 22.

Don't know about this.

Günter



Re: convertDefault.py is broken under python 3

2019-03-17 Thread Scott Kostyshak
On Mon, Feb 11, 2019 at 01:25:41AM +0100, Uwe Stöhr wrote:
> Today I tried LyX 2.3.2 with Python 3.7.2 and found that all image
> conversions failed. I investigated and I found out that this commit
> introduced the problem:
> 5b160e82
> 
> Line 38 fails since there is no .decode() for strings.
> Also line 35 fails but strangely not line 29.
> 
> Attached is the diff to get it at least to work.
> José, could you please have a look?
> 
> Besides this I don't understand why we limit the depth for image
> conversions to 8 bit:
> sopts = "-depth 8"
> 
> I cannot see a reason for this limitation. So if there is no longer one,
> sopts should be kept empty in line 22.
> 
> thanks and regards
> Uwe

Bump. Did we get this figured out?

Scott


signature.asc
Description: PGP signature


convertDefault.py is broken under python 3

2019-02-10 Thread Uwe Stöhr

Today I tried LyX 2.3.2 with Python 3.7.2 and found that all image
conversions failed. I investigated and I found out that this commit
introduced the problem:
5b160e82

Line 38 fails since there is no .decode() for strings.
Also line 35 fails but strangely not line 29.

Attached is the diff to get it at least to work.
José, could you please have a look?

Besides this I don't understand why we limit the depth for image
conversions to 8 bit:
sopts = "-depth 8"

I cannot see a reason for this limitation. So if there is no longer one,
sopts should be kept empty in line 22.

thanks and regards
Uwe
diff --git 
"a/C:\\Users\\USti\\AppData\\Local\\Temp\\TortoiseGit\\convertDefault-4162ed1.000.py"
 "b/D:\\LyXGit\\Master\\lib\\scripts\\convertDefault.py"
index 8678965013..3a2cd645aa 100644
--- 
"a/C:\\Users\\USti\\AppData\\Local\\Temp\\TortoiseGit\\convertDefault-4162ed1.000.py"
+++ "b/D:\\LyXGit\\Master\\lib\\scripts\\convertDefault.py"
@@ -32,10 +32,10 @@ if fout.close() != None:
 # caution: windows has a convert.exe for converting file systems
 command = 'convert'
 fout = os.popen('convert -version 2>&1')
-output = fout.readline()
+#output = fout.readline()
 fout.close()
 if not PY2:
-output = output.decode()
+output = output
 
 version = re_version.match(output)
 
@@ -59,7 +59,7 @@ else:
 # IM >= 5.5.8 separates options for source and target files
 # See http://www.imagemagick.org/Usage/basics/#why
 if im or gm:
-sopts = "-depth 8"
+sopts = ""
 topts = ""
 elif sys.platform == 'darwin':
 command = 'lyxconvert'