andrews05/ResForge

Icon Resource issues

GHamyntas opened this issue · 5 comments

Firstly, I'm very grateful for your app which I've been trying out today - thanks for bringing resource editing into the 21st Century.

A couple of issues ...

  1. with the sidebar closed - when I group-select a files icon-resources (icl4, icl8, ICN# etc) - each maybe containing several typeids (128,256,-16455) and delete their resources and save the file I have found that despite appearances Custom Icons (ID -16455) are not being removed and remain in the resource file when reloaded. Note this seems to only happen when I do a simple Save (command-S) rather than saving as a new file.

  2. with the sidebar open - when I delete an icon resource and click onto the next icon resource type in the sidebar the application crashes. (I'm on 10.14.6) - I can delete other resource types with the sidebar open but not icon resources?

  3. any chance of allowing export of icons as PNGs with their transparency preserved - I think you can only export TIFFs at present.

And if this isn't enough, I wonder if it's possible to choose a custom font or maybe just font-size for the Hex Editor.

Thanks again - please accept these quibbles as evidence that your app has found a home and is appreciated.
AveniBoo.zip

Hi there, sorry for the late reply, I only just found this (not sure why I didn't get notified).

  1. Well this is an interesting issue. I suspect this is caused by the standard way in which the system saves documents. The program writes the data out to the specified path and then the system helpfully restores the original file's custom icon. I'll have to consider what I should do about this, but in the meantime you can of course just delete the icon from the Info window in Finder.
  2. Fixed, thanks!
  3. The transparency is not a matter of png vs tiff (you'll note the ICN# resources do preserve transparency when exported as tiff). The issue is that the transparency (mask) normally used for colour icons is actually not stored in those resources themselves, but shared from the mask for the black & white icons. ResForge's architecture currently doesn't allow cross-access between resources on export - strictly speaking, what you're getting is an accurate representation of the content of the resource, even if it's not how Finder would display the icon. This is something I could look into further in future perhaps, but unfortunately it's not a simple matter. As above, you could always copy the icon from the Finder Info window ;)
  4. I'm not likely to add any further features to the hex editor sorry, though I could consider changing the current settings. What font/size did you have in mind?

Thanks for your report, feedback is always welcome! Out of curiosity, how did you find this and what sort of things are you using it for?

@GHamyntas Updates!

1 - Fixed! Saving a resource fork is more correct now and should have no unusual side effects.
3 - I've made some changes here to load the mask for colour icons into the image window when opening the resource, so it will show correctly there. Note however that this does not affect either the thumbnail in the grid view or the export - these will still not load the mask, for the reasons mentioned earlier. (As an alternative to export, you can copy the image from the image window and paste into another program - this will preserve the transparency).
4 - I've added keyboard shortcuts to the hex editor to control the font size with cmd +/-. Hope this helps!

There's still a couple of things on my to-do list before the next release, but hopefully will be out by the end of the month.

Version 1.1.1 is now released, with all of the above changes.

Thanks for your recent updates - sorry for the late reply ... I use Mojave so have just got around to installing Catalina on a USB Drive, installing the correct XCode version and compiled your newest version.

  1. very pleased about the new settings to change text size - my optician sends her love.
  2. very happy about no crashing and to my mind simpler resource deletions

BUT

  1. it's probably something I did in building the new 1.1.1 version in XCode but saving isn't working for me on either Catalina or Mojave - it goes through the motions but doesn't produce any saved file. No error messages. I thought it may be code-signing or some weird apple built in protection so ran "codesign -f -s - --deep /Applications/ResForge.app" - still no joy.

I'm sure this is something with my setup so could I ask you to upload a working version 1.1.1 app to the releases section as you have for your previous updates?

ETA I have a working version now - I downloaded an earlier snapshot of the Graphite dependancy and recompiled - saving now works fine.

Thanks again - keep up the good work.

Oops, looks like the upload failed and I didn't notice. Sorry about that, I've added it now.

(The version of Graphite on the v1.1.1 tag is inadvertently referencing a commit from my own fork of Graphite, which is probably causing problems when others try to build it. This is now fixed on master.)