Forum Discussion
Neither did I. Did a quick google and it looks like they are some sort of layered version of an image? Most of the google hits were people trying to load them into things which didn't like them. Just like this.
My guess would be they're not supported and you may need to make it a "flat" image of a supported type first.
Well, I downloaded what looked like a multipage TIFF file and did a quick Compare test of itself to a copy and it *seemed* to work...
- ICE9 years agoNew Contributor
Hello,
By multichannel I meant CMYK + additional spot color channels, please find enclosed such a image.
In fact the LoadFromFile is the one that is not able to load this kind of image without throwing any error:
referencePic["LoadFromFile"](pathReference)//multichannel picture is not loaded
comparedPic["LoadFromFile"](pathCompare)
Thank you.
- Colin_McCrae9 years agoCommunity Hero
I tried your example file with MS Paint and Paint.NET and neither would load it.
But when I tried in in TestComplete (v11.20), it seemed to accept it OK? (I checked - and Stop On Error was switched on)
I declared an image, did a "LoadFromFile" into it, using your sample image. Then loaded another copy of it into another declared image object, and compared them. It came out TRUE. Changed the second image to a random PNG I had lying around on the drive, and the compare comes out FALSE.
Have you declared objects as images before you've tried to load the image from file?
Although, while it doesn't actually throw an error on loading, it also doesn't return any useful properties such as the handle or size. On my PNG, these are all present an populated. The TIFF shows no handle and size properties all show zero. So maybe it isn't actually loading properly and it's just comparing two empty images when I compare it with a copy of itself? Not sure.
- ICE9 years agoNew Contributor
Our initial post was misleading, sorry about that.
Indeed the Picture.LoadFromFile loads an empty Picture object, which is in fact unusable for other further operations (like Compare).
See our code snippet below:
var referencePic = Utils["Picture"];
var comparedPic = Utils["Picture"];
referencePic["LoadFromFile"](pathReference)//multichannel picture is not loaded!
comparedPic["LoadFromFile"](pathCompare)
if(referencePic["Compare"](comparedPic, false, threshold, false, colorTolerance))
Thanks.
Related Content
- 2 years ago
- 3 months ago
- 12 months ago
- 4 years ago
Recent Discussions
- 11 hours ago
- 12 hours ago