I do see that the right hand half is a very dark blue in comparison to the black left hand side.
Is that as intended Graham, you’re getting a black image when running but expect a very dark blue?
Can’t see how it could be a bug with my code being there isn’t, there is a simple WebImageViewer and an image assigned to it. To make sure it’s not a bug in my code I’ve created a project with just the above in, no chance of mistake.
The original image is 100x100 set to 1, 7, 31 after importing it into Xojo I get 1, 6, 23.
Try it your self Original
This is the file Xojo makes
This is what OS X shows about the two files
I’m not expert but it seems Xojo is removing the colour profile, I’ve tried saving the Original image with no Colour profile but same issue.
[quote=121702:@Graham Spratt]It’s not black it’s RGB 1, 6, 23 but is very close to black.
I’ll try with yellow, the original image is RGB 255,255,0, what Xojo gives me is RGB 255,253,10. Again this is not the same as the original.
Original
Xojo Version [/quote]
Now you’re talking.
I encountered a similar issue when I wanted to detect the position of the dock on the screen by capturing the image of a 2x2 pixels target moving on the screen and detect them with RGBSurface.Pixel. Colors were never the ones in the original picture. I finally settled for some tolerance in the non black colors.
Xojo has nothing to do in the phenomenon. It has all to do with the color profile of the display. If I pick your original image, look for the infos of the file, and capture its preview with Cmd-shift-4, I get 253-253-10. If I change from standard RGB profile to Adobe RGB, I get for the very same image 254-250-59.
In effect, you have bumped into Apple display wizardry. We tend to consider the screen as the very exact representation of a picture, when in reality, it is an interpretation more or less twisted to please the eye of the user
Screenshots are a bit of a pain changing it like found that our few months back, I’m new to Mac, as far as I’m aware Windows doesn’t do that when taking screenshots.
I’m still not sure why this means the Source and Xojo version are different being I’m not taking a screenshot to get the Xojo version I’m viewing the source and saving the file, also I can see a visible difference in the two yellow images when viewed on screen if I put the web app in chrome alongside the original image.
[quote=121709:@Graham Spratt]Screenshots are a bit of a pain changing it like found that our few months back, I’m new to Mac, as far as I’m aware Windows doesn’t do that when taking screenshots.
I’m still not sure why this means the Source and Xojo version are different being I’m not taking a screenshot to get the Xojo version I’m viewing the source and saving the file, also I can see a visible difference in the two yellow images when viewed on screen if I put the web app in chrome alongside the original image.[/quote]
How exactly are you saving the picture from the WebImageView ? Could you post the code please ?
Michel is correct. I see this in desktop apps, too. Very annoying. Even in the same app the logo when shown in a window is different to the logo when used in a dialog.
If you’re using chrome, cmd+alt+i and your see a magnifying glass far left click that.
Then place your mouse over the image top right that will highlight the code in the source viewer click the link and it will preview it then click the link displayed in the preview and it will open the image in a new tab, right click the image and save.
You now have the xojo version of the image without taking a screenshot.
OK. Testing was necessary. For some reason, Xojo renders images dragged into the project with the same distortion that the system has. Now I will ask the reader to have the courtesy to read very carefully. All this is the result of careful experiment, not simple impressions.
If I save the rendered image that was originally 255-255-0 on Mac from Chrome, I get 253-253-10. On PC I get 255-250-0. These values are exactly identical to what a screen capture would have produced. So the only conclusion is that somehow Xojo is employing the very same routines that the system uses to display the picture.
When I capture the original image rendered on screen, the very same values apply. So in effect, the original picture 255-255-0 arrives in the eye of the user as 253-253-10 on Mac and 255-250-0 on PC.
If I capture the screen for the same image on the Chrome display from the Xojo application, I get 255-253-10. The original picture dragged into chrome produces identical results : 255-253-10.
It seems that whatever the source, the resulting image as rendered by Chrome is never 255-255-0.
[quote=121724:@Graham Spratt]Michel, try this if you can see a visual difference in the two yellow images above
Right click my original image above and save it to your desktop.
Open Xojo and drag that image onto the form and run the project.
It opens it whatever browser you have, now open the original image in preview and move it alongside the one in the browser.
You should now see the two yellow images are not the same colour.[/quote]
My eyes will never be as precise as PhotoShop. Each time, I am capturing the color with Cmd-Shift-4, and drag the image in Photoshop where I look at the result. This is, I believe, the only way to make sure the color is measured precisely, in the absence of a spectrometer.
The 255-255-0 picture dragged into the project and shown in Chrome : 253-253-10
The 255-255-0 picture dragged directly into Chrome : 253-253-10
The 255-255-0 picture opened into Preview : 255-253-12
There is indeed a difference between the way the picture is rendered by Chrome and by Preview, so your eyes are indeed right. But there is absolutely no difference between the same picture displayed directly by Chrome from a local file, and what the WebImageView shows in a running Web app.