Upload Image (.png)

24 views
Skip to first unread message

al...@aspbrasil.net

unread,
Feb 7, 2018, 11:53:35 AM2/7/18
to KalikoCMS Developer Forum
HI

I uploaded an image in png format, but when I call it in the view it shows with black background instead of transparency

I opened the Imagecache directory and the image generated has black background

Does anyone know how to solve this problem?

Fredrik Schultz

unread,
Feb 7, 2018, 12:07:58 PM2/7/18
to KalikoCMS Developer Forum
Have you cropped the area in the image editor? Or do your property has dimensions set through the width and height parameters, like?:

    [ImageProperty("Top image", Width = 848, Height = 180)]
    public virtual ImageProperty TopImage { get; set; }

Otherwise the original image should be used.

al...@aspbrasil.net

unread,
Feb 7, 2018, 12:26:42 PM2/7/18
to KalikoCMS Developer Forum
Hi

I've tried both ways, and both gave me the same result


[ImageProperty("Imagem Topo")]
public virtual ImageProperty ImagemTopo { get; set; }

and

[ImageProperty("Imagem Topo", Width = 597, Height = 838)]
public virtual ImageProperty ImagemTopo { get; set; }

al...@aspbrasil.net

unread,
Feb 7, 2018, 12:29:15 PM2/7/18
to KalikoCMS Developer Forum
Wait


I've tried again, without the crop, png is perfect, I think its something in the cached image

For me, it will work, but maybe it would be good to take a look at it


Thanks again Fredrik

Fredrik Schultz

unread,
Feb 7, 2018, 4:38:47 PM2/7/18
to KalikoCMS Developer Forum
Yes, resizing or cropping will always use JPG. Being able to keep the original format would be a nice feature, I'll add it to my TODO-list.

All in all the image editor is due for an update with better scaling support etc.
Reply all
Reply to author
Forward
0 new messages