dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.04k stars 1.17k forks source link

CMYK Tif with transparency #2339

Closed EmaginationStore closed 4 years ago

EmaginationStore commented 4 years ago
<Window ...
    <Grid>
        <Image Source="Untitled-1.tif" />
    </Grid>
</Window>

tif attached in zip file Untitled-1.zip

weltkante commented 4 years ago

Please show the project file, I suspect you did not add the image to the project correctly. You need to mark the image with a <Resource> tag for it to be included in the build, .NET Core has different defaults here than Desktop Framework.

It only works in the Designer because it picks it up from the filesystem relative to the project. If you copy the image to the output directory it may work just as well.

EmaginationStore commented 4 years ago

You are quite right, sorry it was not marked as a resource and now works.

So the behaviour in Visual studio differs between WPF for .net Framework and .net Core because when I import an image into a .net Framework WPF project, the image is automatically set as a resource, where .net Core is not.