image save changing file exension

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

image save changing file exension

French, Shelane
Lasso 8.6.3 Linux

local('image' = null, 'img' = null);
local('filename' =  ('/photos/IL___' + #loanID + '.jpg'));
local('image' = include_url(#imgurl));
if(#image);
#img = Image(-Binary = #image);
#img->save(#filename);
/if;


When I check the files, all the images saved have the extension gpg.

So they would look like:  IL___L000148.gpg

That's leading to strange errors. Anyone else see this?

[cid:3E60371D-5546-4F40-842E-D8F756B07B38]
Shelane French
Workforce Enablement
Livermore Information Technology


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: image save changing file exension

bienvenue
Hello Shelane, list,

It's an old image tag issue...
sometimes when using save, not only the extension, but any char of the name, even the path, can be randomly changed...
(Lasso 8 Cent OS)

A workaround is to use file tags  to save image rather than image tag

 instead of this code #image -> Save(...) use file_write(...).

You could use OS_Process to manage images with GhostScript and GraphicsMagick libs instead.

Tracked in LassoTalk almost from 2013 :

- Apr 15, 2016
Image tag sometimes saving files with scrambled filenames (Lasso 8 on CentOS)
http://lasso.2283332.n4.nabble.com/Image-tag-sometimes-saving-files-with-scrambled-filenames-Lasso-8-on-CentOS-td4645072.html

- Nov 05, 2014
A weird case where image->save changes the image file name provided
http://lasso.2283332.n4.nabble.com/A-weird-case-where-image-gt-save-changes-the-image-file-name-provided-td4642512.html

- August 27, 2013
Image Tags on 8.6.2
http://lasso.2283332.n4.nabble.com/Image-Tags-on-8-6-2-td4639281.html

Regards
JPK
----
E SYSTEMES - Lille France
----
Le 1 juil. 2016 à 21:57, "French, Shelane" <[hidden email]> a écrit :

> Lasso 8.6.3 Linux
>
> local('image' = null, 'img' = null);
> local('filename' =  ('/photos/IL___' + #loanID + '.jpg'));
> local('image' = include_url(#imgurl));
> if(#image);
> #img = Image(-Binary = #image);
> #img->save(#filename);
> /if;
>
>
> When I check the files, all the images saved have the extension gpg.
>
> So they would look like:  IL___L000148.gpg
>
> That's leading to strange errors. Anyone else see this?
>
> [cid:3E60371D-5546-4F40-842E-D8F756B07B38]
> Shelane French
> Workforce Enablement
> Livermore Information Technology
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>