PDA

View Full Version : Translation problem



Evert Schmit
4-Mar-2010, 11:03 AM
Why has the function ToANSI, unlike in a BitmapContainer, no effect in a cImageContainer?
Cf. "Set psImage to (ToANSI(sFileName))" and "Set Bitmap to (ToANSI(sFileName))"
The only succesfull way to display an image, as the filename contains diacritics, seems to be select the image through the method "SelectImage".

Vincent Oorsprong
5-Mar-2010, 01:56 AM
Evert,

The graphics library can shows files whose name is not in the OEM character set (test it with the ImageGallery example) but it expects the string to be OEM as VDF expects the strings to contain OEM characters. The psImage does an OEM-to-ANSI conversion to find out if a file exists or not. Finally, when the image is created in memory it done in a OEM-to-WSTR conversion.

Evert Schmit
5-Mar-2010, 05:31 AM
Vincent,

Thank you for your attention and your kind and adequate explanation.
As an amateur I have written an application to manage my photographic files. That is a wonderful exercise, now we have the cImageContainer. But for me it is much trial and error. So I had also missed the solution for my "problem" cause I didn't realize the path in the filename obviously is case sensitive.

With regards,
Evert Schmit.

Vincent Oorsprong
6-Mar-2010, 01:50 AM
Evert,

I am aware that files with some ANSI filenames fail to display all together. But then I found out that also Irfanview cannot show them. Microsoft's tools can...

Evert Schmit
6-Mar-2010, 11:46 AM
Vincent,

Eventually my tif files are found and displayed with no exception, no matter what filenames they have, but: provided that the pixel order = interleaved (and not per channel).

With regards,
Evert Schmit