rejetto forum

ICON transparant bacground bug

0 Members and 1 Guest are viewing this topic.

Offline SvenBent

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
It seems that HFS does not understand icon with transparency. In the HFS main windows and on the served html page, the  icons transparent part er replaced with black.
That's rather unfortunate for icons that are black and transparent since the turn into a total black squarer.


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
« Last Edit: April 15, 2015, 04:53:00 PM by bmartino1 »
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
can you provide a screenshot of the problem?
i'm not aware of it


Offline SvenBent

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
sorry for the late feedback.

But here are 2 screenshots as well as the 2 icon files I'm using in my .exe files


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
First, it is not a bug, (IMHO)!...
i can't find a resorce to expalin why this happen...nor, how it happens,

I know it does this, all servers do(never been a big issues with in the develompent for HTML traffic!...

It has smothering to do with HTML in the fact that a image with a transparent background becomes white (the default html background color)...

*Why/how.. doesn't matter
the point, you have to edit html code/ css to "FIX IT!"

examples:
http://stackoverflow.com/questions/6289592/transparent-background-color-in-image

#myDiv {
 background:transparent url(myImage);
 }

and/or

http://stackoverflow.com/questions/4738358/png-image-with-transparency-renders-with-white-background-in-all-browsers

<html.... BackColor="Transparent" />
-----------

other resources:
http://stackoverflow.com/questions/12662759/make-white-background-of-image-transparent-in-css

***
...i see that you are serving "ICO" file type files for icon on the page... they are icon files(they don't hold the transparent background info!), "png" filetypes will!,You need to you a pic that will hold a transparent background within the picture file info...

You can set/edit  these icon files with Gimp/paint.net/photshop to fix the images to your like-ing, then save them  as "png"s...

Then using html,  have them be sized down and look like icons...
http://www.w3schools.com/tags/tag_img.asp

try:
<img src="image.png" alt="Smiley face" height="42" width="42" BackColor="Transparent" >

the image will appear on a webpage on how it appears if you got to the files itself. since you have the icon files, if you go to the web address of your icon files and open that link, that is how the picture will appear. From there you can take the picture "USING HTML / CSS" to make it transparent, icon files will not hold a transparent background in html! you are limited to certain file types...

*i will not edit the images as i don't want to, nor know how you want them...
if you open the image.png(with a transparent background within its image data...) the file on your HTML serve and will have a transparent background, then it will show a transparent image for you to use...

*
So, if the css / html will not work for you current needs, do they have to be icon files?.. if they do, sorry your out of luck!
« Last Edit: April 29, 2015, 04:25:42 PM by bmartino1 »
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
@SvenBent: Hmmm... I have to investigate this, but it seems it's only a detail. Anyway, how system Explorer.exe handles EXE icons (and his transparencies), it may be different to how HFS handle icons and his transparencies. As far I know, HFS converts icons in GIF files, so, in that conversion, the transparency may be lost! (in that case, it's a small esthetical bug).

Just to be sure, upload those two files somewhere (and post the links here), so Rejetto (or anyone else here), can see "your problem".



@bmartino1: I like all your hard work, I mean, I really like all the effort that you do! ...but it's somewhat "weird", how you do always choose the most complicated way (or path) to solve problems, hehehe. Just a joke, keep the good work... :) You do an amazing job here!
« Last Edit: April 17, 2015, 08:58:05 AM by LeoNeeson »
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline SvenBent

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
First, it is not a bug!...
i can't find a resorce to expalin why this happen...nor, how it happens,

I know it does this, all servers do(never been a big issues with in the develompent for HTML traffic!...

It has smothering to do with HTML in the fact that a image with a transparent background becomes white (the default html background color)...

*Why/how.. doesn't matter
the point, you have to edit html code/ css to "FIX IT!"

examples:
http://stackoverflow.com/questions/6289592/transparent-background-color-in-image

#myDiv {
 background:transparent url(myImage);
 }

and/or

http://stackoverflow.com/questions/4738358/png-image-with-transparency-renders-with-white-background-in-all-browsers

<html.... BackColor="Transparent" />
-----------

other resources:
http://stackoverflow.com/questions/12662759/make-white-background-of-image-transparent-in-css

***
...i see that you are serving "ICO" file type files for icon on the page... they are icon files(they don't hold the transparent background info!), "png" filetypes will!,You need to you a pic that will hold a transparent background within the picture file info...

You can set/edit  these icon files with Gimp/paint.net/photshop to fix the images to your like-ing, then save them  as "png"s...

Then using html,  have them be sized down and look like icons...
http://www.w3schools.com/tags/tag_img.asp

try:
<img src="image.png" alt="Smiley face" height="42" width="42" BackColor="Transparent" >

the image will appear on a webpage on how it appears if you got to the files itself. since you have the icon files, if you go to the web address of your icon files and open that link, that is how the picture will appear. From there you can take the picture "USING HTML / CSS" to make it transparent, icon files will not hold a transparent background in html! you are limited to certain file types...

*i will not edit the images as i don't want to, nor know how you want them...
if you open the image.png(with a transparent background within its image data...) the file on your HTML serve and will have a transparent background, then it will show a transparent image for you to use...

*
So, if the css / html will not work for you current needs, do they have to be icon files?.. if they do, sorry your out of luck!

Its a bug as it's a pierce if work done by HFS that is not correct.
I don't know what you mean by all servers do.  But i pretty sure plenty of  HTTP servers can deliver an .GIF file with transparency.

I don't know why you are talking about white background.  The background in the icon in HFS is clearly black.
I can see that the uploaded pictures show its as qhite and has other artifacts

no amount of html code can change the fact that the .GIF pictures has no transparent pixels.
Please. Try to do proper homework before correcting someone next time by posting links that is not relevant. (PNG alpha channels issues are different from a .GIF marked palette transparancy)

anyway to put it short
HFS is making wrong .GIF files with no transparent pixels



@LeoNeeson
I did upload the icons files in a zip file in ny previous post.  But I'm uploading the wrong .GIF file and the .exe again just in case.
As backup both .exe files can be found here  on my site http://162.248.14.6/
So both .exe and the .gif can be downloaded in case the forum messes up my uploaded files.

Is there a way to inject my own. gif files ?


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
You are right SvenBent, I can confirm the bug. HFS is not handling EXE transparencies as it should. Both files (Mercury.exe & Phoenix.exe) are giving transparency problems. Keep your server open, until Rejetto get the files, and sees the problem.
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
whatever.. you guys ...  ;D
I also was able to recreate it, but was able to corect it...

@ LEO --I've been told that from school with in many program classes... :)

I'm wiling to bet as the fiels he uploaded when i looked at it, that it has to due with the side fodler with the thumbs and ini not transporting the corect image...

What i mean, why are you the only one with these exe havin this issues with transparenting, i have upladed and transfered many exe with HFS when in my computer repair shop... Never had an issue/ still don't... its you file!
« Last Edit: April 24, 2015, 03:14:48 AM by bmartino1 »
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline SvenBent

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
whatever.. you guys ...  ;D
I also was able to recreate it, but was able to corect it...

@ LEO --I've been told that from school with in many program classes... :)

I'm wiling to bet as the fiels he uploaded when i looked at it, that it has to due with the side fodler with the thumbs and ini not transporting the corect image...

What i mean, why are you the only one with these exe havin this issues with transparenting, i have upladed and transfered many exe with HFS when in my computer repair shop... Never had an issue/ still don't... its you file!

How did you correct it ?.
I have no issues with transfering files. just this lack of transprancy in the .gif files HFS make
Also this seem to happen to all icons that are not using the HFS built in icons.
The icon from firefox are also lacking transparency. so its not just my files.

I'm wondering if its due to icon with alpha channels confuses the icon to .gif convertion and it drops alpha channels completely ( The 100% transparant pixels are black in RGB data channels)
seems it can only handle on/off transparancy
« Last Edit: April 24, 2015, 04:35:10 AM by SvenBent »


Offline SvenBent

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
I can inform alpha channel transparancy and png compression in .ico files are not the issue for HFS

I did manage to fix it by using another  png to ico converter


Offline SvenBent

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
Would it be possible for HFS to make png files instead of gif. Thereby it can contain the the full 24bits colors and 8 bit alpha channels of the modern windows icons.


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
Would it be possible for HFS to make png files instead of gif. Thereby it can contain the the full 24bits colors and 8 bit alpha channels of the modern windows icons.
That would be great. Adding support for PNG it's the way to go. But please (rejetto), if you add this feature, don't remove the option (hidden in HFS options) to still use GIF, since old IE versions works better with GIF, than with PNG. Anyway, this is not a important bug, it's only a small detail.


I'm not a programmer, but maybe some of this Delphi components/websites, may help (I found them doing a Google search: "Reading alpha channel ICO Delphi"):

Code: [Select]
http://www.tkweb.eu/en/delphicomp/kicon.html
http://www.aha-soft.com/faq/delphi-imagelist-png.htm
http://blogs.msdn.com/b/oldnewthing/archive/2010/10/21/10078690.aspx
http://www.delphibasics.info/home/delphibasicssnippets/extractcompleteiconallsizes
http://stackoverflow.com/questions/9805587/load-multiframe-icons
http://forum.lazarus.freepascal.org/index.php?topic=5265.0
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
exactly, HFS does a poor job with icon's transparency.
I hate it, but since i rarely have the time to work on HFS i don't plan to give this aspect priority. It would be nice anyway if someone else does!


Offline SvenBent

  • Occasional poster
  • *
    • Posts: 10
    • View Profile
How dare you not take my cosmetic bug as highest priority. I think i would need a refund... ;D

Where does HFS actually save those gif files ?