[ImageToolbox] Discussion

[ImageToolbox] Discussion

  
Forge Component
(3)
Published on 31 Aug by João Portela
3 votes
Published on 31 Aug by João Portela
I know it's been a long time but does anyone can provide an espace template to show how it really works?
Hi Carlos,

Even though I've never used the extension, after opening it my guess is that the two actions encapsulate the "Convert" and "Identify" operations from ImageMagick.

While in the Identify method you don't need to pass any arguments asides from the image, for the convert method you can learn more about the options in ImageMagick's reference document for the convert operation.

I hope this helps.

Regards,

Paulo Tavares
Thanks for the tip! I will start now my trip through this tool :)
For example, I want to resize an image.

Checking the examples in their API, you have to do something like: convert logo: -resize '100' wiz1.png

How can I do this with the extension? 

What should I pass in the "options" variable?

Any help?

Tks and good easter :D
Hi Carlos,

Inferring from the API, I'm assuming that you'll pass the "wiz1.png" file's binary content as the SourceContent parameter, and then to the options you'd pass

logo: -resize '100'

If it isn't that, it should be something pretty similar to it :)

Let us know how/if it works.

Regards, and Happy Easter!

Paulo Tavares
No, it doesn't work that way. I've opened the C# project and I'm trying to figure it out how it works.

If I succeed, I'll post an example for further people use this tool.

Meanwhile, if someone knows the trick, it would spare me some time.
Hey guys! 

I've figured out a way to work with this extension. Now I'm able to use it and I've update the image magick tools. If somebody get stucked with this, please, send me your problem and I could try to solve it. I can also make available my "new" extension and that can be a good start point for you.
Great news. I was actually about to post that the problem with my last suggestion was that the "logo: " part was obviously not a part of the "options" parameter, and probably the '100' should just be 100.

What did you do to get it to work?

Regards,

Paulo Tavares
Well, I've kinda updated it to work it my way. Several stuff were not quite right but the principles were all there.

A few things that I've changed:
- The "work" folder was changed to "C:\temp" because I didn't have permissions to change files in the original folder. Instead of change windows permissions, I prefered to create a temporary work folder.
- I've updated the dll and exe of image magick
- I've changed the "command" option in C# to receive the full path of the picture
- Other few stuff

As I said, if anyone needs it, I'm here :)
An example OML would have been nice ...
Bad to see an extension is published with no comments what so ever.
None of the parameters has a description ...
Apparently you input the binary in the SourceContent and then specify something like "-resize 200x200" in the Options.
Hi all,

Has anyone used this extension in Platform Server version 7.0.1.x? Is there an up-to-date version to this extension?

Thanks!
I can't make any download at the forge.
It seem to be some javascript bug on Download Button, someone know a workaround to get the components from the forge?
Hi José,

Are you still having issues downloading components from the Forge? Send me a private message if the problem persists so that we can track down what's wrong.

Cheers,
Davide
Nop, now everything seems to be working fine!

Thanks!
Cool! Glad to hear that. :)
I tried Convert gif image to jpg but is returned the feedback message:

convert.exe: unable to open image `xxxx.gif': No such file or directory. convert.exe: unable to open image `txxxx.jpg': No such file or directory. 


I specified to test something like: "xxxx.gif -resize 500 -quality 15 xxxx.jpg"
What's wrong?
Did you solve this Marcos?

I get the same issue. It is when I'm uploading to the database...
Hi Andre,

Can you detail a bit more what is the problem you are having?
Sure,

I use the Upload widget to access an image and upload it. I have a button to upload to the database. But I would like to reduce the the size of the image before I upload it.

Using the ImageToolbox widget to do this. I set the following parameters on the convert action...
When this execute I get the message that the file isn't found

"convert" + ImageRecord.Filename + "-resize 1024x1024\>" + "-unsharp 0x6+0.5+0" + "-quality 75" + ImageRecord.Filename

convert.exe: unable to open image `convertIMG_0215': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert.exe: unable to open image `copy.jpg-resize': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: no decode delegate for this image format `JPG-RESIZE' @ error/constitute.c/ReadImage/501.
convert.exe: unable to open image `1024x1024\>-unsharp': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert.exe: unable to open image `0x6+0.5+0-quality': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: no decode delegate for this image format `5+0-QUALITY' @ error/constitute.c/ReadImage/501.
convert.exe: unable to open image `75IMG_0215': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert.exe: unable to open image `copy.jpg': No such file or directory @ error/blob.c/OpenBlob/2701
Andre,

For you to use this extension you have to do the following:
  1. Publish the extension in your environment
  2. Add a reference to the Convert action on your application.
  3. Use the convert action on the screen action that stores the image to the database. Pass it the binary content from the upload widget and on the Options parameter the settings you want
  4. Use the output of the Convert action, assigning it to the record that will be stored in the database.
You can check a similar use case that also uses an extension to reuse existing C# or Java code.
That is exactly how I implemented it.
Can you share a screenshot of the flow that shows how you are using it? Or (even better) if you can share your module so that I can take a look at it. Use Ctrl+S to export the module.
  Here is a screen shot...

I Have a Local variable of type imageRecord (id, Binary, Type, FileName) that is populated. This information is then sent to the Identify an Convert.


Ok it does look good.
Does the Identify action work ok?
What are you setting for the Convert input parameters?
Yes the Identify work great

SourceContenct: ImageRecord.BinaryContent
Options: "convert" + ImageRecord.Filename + "-resize 1024x1024\>" + "-unsharp 0x6+0.5+0" + "-quality 75" + ImageRecord.Filename
Ok now I get it!

The options parameter is only for the parameters to the convert comand. In your case you can try the following:

"-resize '1024x1024>' -unsharp 0x6+0.5+0 -quality 75"

Cheers
HI.. I am trying to use this function along with the wizard created picture upload component.  Let's say I have a product entity and then use the accelerator to create a productpicture entity. Then on a screen I put a product picture.  In the action on the Change Picture - I want to use this image utils to resize the picture to 100x100.  I tried inserting the Convert command after the Popup Upload with the options " -size 100x100"   That did not seem to do anything. Any hints?