NO

Author Topic: Errors in Bitmap-Resource  (Read 3530 times)

OliverKroll

  • Guest
Errors in Bitmap-Resource
« on: May 04, 2009, 11:40:13 AM »
Hi Pelle !

I'm using Pelles C Version 5.00.8 for some months now (I like it) and want to report two bugs concerning new bitmap ressources:
1. bitmaps can be given a name only after having given them a number,
2. the name of the bitmap file is not written to the ressource file automatically.
I added an illustrated step by step report (open office document).

I had to delete some of the step by step pictures for matching space requirements (<=256 KB). Sorry for this.

Edit: the name of the new bitmap file is "Gespenst.bmp", but it is "res1.bmp" in the ressource file.

Greets
Oliver Kroll
« Last Edit: May 04, 2009, 11:45:00 AM by OliverKroll »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Errors in Bitmap-Resource
« Reply #1 on: May 05, 2009, 05:04:14 PM »
Hello Oliver,

I had some trouble viewing the .odt file; apparently it's an OpenOffice document, which I don't have. Eventually I found a trial viewer I could use...

After all that, I'm not sure I understand the problem. As far as I can see the IDE is doing what it's supposed to do. I have attached a ZIP file with a picture attempting to describe this, but I'm not sure it helps. Maybe I don't understand the real problem...
/Pelle

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Errors in Bitmap-Resource
« Reply #2 on: May 05, 2009, 05:22:52 PM »
<OT>
OpenOffice is free and it can export PDF files OOTB.
Oliver, you should post PDF files, which everybody can view, native office documents of any office suite are always causing troubles.
</OT>
---
Stefan

Proud member of the UltraDefrag Development Team

OliverKroll

  • Guest
Re: Errors in Bitmap-Resource
« Reply #3 on: May 05, 2009, 08:59:57 PM »
I changed all pictures to ".gif" to append them all (I didn't know it was only 10 percent of a bitmap) and exported the document to pdf.
As you may have guessed, I'm trying to write a pac man.
I don't know yet how to load external bitmaps so I'm taking the ressource bitmaps.
I have painted all the walls and am beginning to paint the many pac mans (4 directions*5 pictures=20 pictures altogether) but I was wondering if I had to always edit the main.rc file. I think that there is a bug that I will try to explain in every detail:

1.When I want to paint a new bitmap, I have to (as far as I know) change to the main.rc (left-click on tab), right-click on Bitmap, choose "Neu/new" and again left-click on "Bitmap".
In the list of bitmaps, at the bottom a new bitmap is appended that yet has not got the right name. If I want to change its name I right-click on its name and choose "Eigenschaften/Properties". At "Ressourceskript" now I seem to be able to change the name, but I cannot type in a new name (sometimes you can type in one at the first time, but you never can a second or third time) because if you click "OK" you are told "Die ID-Nummer 8022 wird bereits von einem anderen Bezeichner benutzt/the ID-number 8022 is being used by another identifier". All you can do is to type in a new ID-number (e.g., "#8023") and only afterwards (after having chosen "Properties" again) you can type in the desired name. This is the first bug that I want to report.
2.You now have given the bitmap the right name and double-click on it. A bitmap editor opens (very comfortable !). You draw your picture and want to save the bitmap by typing control-S. A file dialog opens, you type in for example "Gespenst/ghost" and you click "OK". You might think the ressource file would be updated automatically:
Gespenst BITMAP "Gespenst.bmp"
but if you use an external editor, you find out it is
Gespenst BITMAP "res1.bmp"
Again you have to correct it yourself. This is the second bug I want to report.

I hope I have explained better this time.

Bye
Oliver Kroll

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Errors in Bitmap-Resource
« Reply #4 on: May 06, 2009, 05:43:30 PM »
1. OK, I can see a problem here if we are talking about "symbolic" names - the name of a symbol associated with a number ("Ansicht" -> "Ressourcenbezeichner...", if I spelled it correctly). There are also "literal" names - when you put " and " around a name in "Eigenschaften" for a resource. (There are two kind of names, so just saying "name" is a little confusing to me).

EDIT: "Extras" -> "Optionen" -> "Allgemein" -> "Eindeutige Ressourcenbezeichner erzeugen" may help. This was added a long time ago to fix some old problem; should possibly be removed, or made default.

2. The possibility to save a bitmap/icon/cursor *resource* to file from the image editor was originally added for me, and me alone, since I sometimes want to save *without* having the name written back to the resource script. This has apperently confused people, so the possibility was removed in version 6.0; the new "Export" resource can be used.
« Last Edit: May 06, 2009, 05:56:17 PM by Pelle »
/Pelle

OliverKroll

  • Guest
Re: Errors in Bitmap-Resource
« Reply #5 on: May 06, 2009, 07:27:03 PM »
1. "Extras" -> "Optionen" -> "Allgemein" -> "Eindeutige Ressourcenbezeichner erzeugen" is doing well.

2. I have just installed Pelles C ver. 6.0 RC 1.
From what I can see in the last five minutes, saving bitmaps manually has really been removed (who can take benefit of a editor that lacks the save function ? The first bitmap is saved automatically, from the second bitmap on no changes of any bitmap are saved: all resx.bmp (res1.bmp, res2.bmp, res3.bmp) files are completely white).
And still the entry in the .rc file is >>Gespenst BITMAP "res1.bmp"<<.
To make it more clear: with four new bitmaps, the entry is:
Gespenst1 BITMAP res1.bmp
Gespenst2 BITMAP res1.bmp
Gespenst3 BITMAP res1.bmp
Gespenst4 BITMAP res1.bmp
All four bitmaps use the same file (in Pelles C ver. 5 as well as ver. 6) ! This still is incorrect.

I want to thank you for looking up the German menu items. This must have taken ten minutes of your time. Thanks !

EDIT: I don't know where to find the "Export" ressource (>>the new "Export" resource can be used.<<). It is not in the index ("Help"->"Contents"->"Index").
« Last Edit: May 06, 2009, 07:32:54 PM by OliverKroll »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Errors in Bitmap-Resource
« Reply #6 on: May 10, 2009, 12:43:26 PM »
1. OK

2. Things are, and should be, different when a bitmap is associated with a resource script/file/whatever; a bitmap loaded directly from a file can of course be saved. Once a default filename has been generated for a resource, it will not be generated again (unless you empty the filename field in Properties). I can't reproduce a problem right now. "Export" can be found in the Resource menu, the context menu, ... The help file doesn't say much because the operation seemed too obvious, I guess. I will add a sentence or two.
/Pelle