How to get original size of image

Hi Expert,
I am trying to get the original size of image in pallete I don’t want to set the fix size of images,
How can we achieve in gojs.

Any help very helpful for me thanks in advance

Thanks,
Mujaeit Pathan

Are you saying that you don’t want to set the width and height (or equivalently, just setting desiredSize) of the Picture in your node template?

You don’t have to if you don’t want to. But if you don’t, the Picture will change size when the image is loaded, which might happen at any time. That in turn might cause the node to change size, which would cause connected links to be re-routed and which might cause a layout to happen.

Those kinds of considerations shouldn’t be a problem in a Palette. What happens when you don’t set the width and height of the Picture?

basically I am trying to implement like below

In shelf different kind of product images we put which height and width are different if I set the height and width of Images in the palette then the inside shelf images look like same

Yes, it’s normal in such designs that each item has to declare (in the model data) what the expected width and height are, independent of any image dimensions. You would use data Binding(s) to make sure your items are that size. You would design the template so that the Picture in the template would automatically get a size no larger than the template/panel size. It depends on what else you want to show and how.

It looks like you are implementing a planogram. I assume you have already seen the Planogram sample: Planogram Of course in a real application one would replace that node template’s Shape with a Picture.

You might also be interested in Northwoods Software’s planogramming services.

Yes. I am interested in planogramming services but when I search for planogram I can see only one sample that you mentioned. Can you please share across the service details or samples you meant in the last sentence

We offer a Software as a Service platform to companies for planogramming, called GoPlanogram. It is built with GoJS (among other technologies).

You can learn more about it here: https://goplanogram.com/

For technical questions, you can email support@goplanogram.com
For sales/licensing questions, you can email sales@goplanogram.com

Can I achieve below planogram in gojs?

Yes you can. In fact it looks like you took that image from the website, goplanogram.com
As Ryan just answered you, it’s built with GoJS.

Hi
Can you help me with that how to show images in shelf based on image size ?
its really help for me

Thanks in advance

As I explained earlier in this topic, if you do not set the width and height of a Picture, it will get its size from the natural size of the image once it has loaded.

Hi Thanks for response that I understood I mean I am facing problem in grid cells
My requirement is like I want Images in self continues without any space between same like above screenshot

That why I was saying it would be normal to specify the width and height of each Picture or at least of each Part holding the Picture. Let the Picture scale the image down to fit the desiredSize. That way you can place each of those Parts next to each other, with whatever spacing you want between them.