NetTalk Central

Author Topic: Net Maps Icons problem  (Read 150 times)

michelis

  • Hero Member
  • *****
  • Posts: 1597
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Net Maps Icons problem
« on: July 27, 2020, 09:49:21 AM »
Hi, Im trying to make more pin icons for my maps, but I cant make it work.
Ive open MapPinBlue.ico, change its color and save it as MapPinLightBlue.ico and when I use it it does not show.
Even make another ones, all 32x32 - 32 like the MapPins*.ico provided.
Attached goes some examples that does not work.
All icon properties are the same as the provided.

Following the code... in draw.clw in:
Code: [Select]
LoadIcon32 routine                                          ! Load from disk
    ! The 32 bit icon format stores each pixel are an BGRA triplet, with the fourth byte in each long an Alpha value
    ! This is in fact the simplest format to handle, as it does not use a combination of an XOR and an AND mask.
    imageStart = iconDirEntry.dwImageOffset + 1 + Size(iconImage)
    imageEnd = imageStart + [b]iconImage.biSizeImage[/b]
    MESSAGE('start: '&imageStart&' '&imageEnd&' size:'&iconImage.biSizeImage)! <<<<<<<<<<<<<<<<<<<

in my icons,  iconImage.biSizeImage=0, in the one provided is 4224 !

If I change
   
Code: [Select]
imageEnd = imageStart + iconImage.biSizeImageby
   
Code: [Select]
imageEnd = imageStart + 4224 !the size of yours icons
It works, all icons are shown.

Ive tried, but I could not figure out where and how you calculate  iconImage.biSizeImage
Sory but theres the problem.

Regards



« Last Edit: July 27, 2020, 12:06:11 PM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10174
    • View Profile
Re: Net Maps Icons problem
« Reply #1 on: July 28, 2020, 07:28:31 AM »
they need to be "defined" in JavaScript as well.
If you look at the bottom of jquery.nt-maps.js you'll see what I mean.
You can make your own markers in your own custom.js file, and just add that to the server.

cheers
Bruce

michelis

  • Hero Member
  • *****
  • Posts: 1597
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Net Maps Icons problem
« Reply #2 on: July 28, 2020, 07:34:54 AM »
But this is for a web server and Im talking about desktop maps.
-----------
Regards
Alberto

Jane

  • Full Member
  • ***
  • Posts: 164
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Net Maps Icons problem
« Reply #3 on: July 28, 2020, 10:05:19 AM »
What icon editor are you using, Alberto?

Draw.clw appears to read iconImage.biSizeImage from a GROUP over the header of the file.

If you look at the attached pic, Bruce's icon has 80 10 00 00 (decimal 4224) where the biSizeImage ulong should be.

Yours has 00 00 00 00.

If I open one of your icons in Axialis IconWorkshop and save it back to disk, it is written back to disk with the length 80 10 00 00 in those bytes.

Jane



michelis

  • Hero Member
  • *****
  • Posts: 1597
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Net Maps Icons problem
« Reply #4 on: July 28, 2020, 12:36:16 PM »
Im using IcoFxPortable editor.
The icons seams to be ok.
Will try to get Axialis.
Thanks Jane
-----------
Regards
Alberto

Jane

  • Full Member
  • ***
  • Posts: 164
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Net Maps Icons problem
« Reply #5 on: July 28, 2020, 05:20:47 PM »
I saved your icons from Axialis.  These have the length information in the header.

Curious whether you'll still have the same problem.


michelis

  • Hero Member
  • *****
  • Posts: 1597
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Net Maps Icons problem
« Reply #6 on: July 28, 2020, 05:54:39 PM »
Thanks Jane but problem is not only my icon modification, Ive downloaded many icons from another sources and I have the same problem with all of them.
The MapPin*.ico that Ive attached are icons that I modified using the Bruce MapPinBlue.ico
But the MapPinBoxBlue.ico was downloaded from the web.
Is there any free version of Axialis ? or any other icon editor compatible with Maps?
Thanks again
-----------
Regards
Alberto

Jane

  • Full Member
  • ***
  • Posts: 164
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Net Maps Icons problem
« Reply #7 on: July 28, 2020, 06:08:01 PM »
Did you try my version of your icons?
Did they work?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10174
    • View Profile
Re: Net Maps Icons problem
« Reply #8 on: July 28, 2020, 06:48:31 PM »
>> But this is for a web server and I'm talking about desktop maps.

As long as they are regular 32 x 32 icons you should have no issues. They can be linked into youor app (and then used with ~ as usual) or as separate files on the disk.

For creation, I use a combination of SyncFusion Metro Studio (free) and Axialis to do color touchups, formats and so on.
But for map pins you could just use Metro Studio.

I did a whole webinar on how I create icons here;
https://www.clarionlive.com/BrowseEpisodes/ww!296

cheers
Bruce


michelis

  • Hero Member
  • *****
  • Posts: 1597
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Net Maps Icons problem
« Reply #9 on: July 29, 2020, 03:03:05 AM »
Did you try my version of your icons?
Did they work?

Yes Jane, they worked, thanks.
Which version of Axialis do you run.
SyncFusion Metro Studio is not free, its free tryal.
« Last Edit: July 29, 2020, 03:15:32 AM by michelis »
-----------
Regards
Alberto

Jane

  • Full Member
  • ***
  • Posts: 164
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Net Maps Icons problem
« Reply #10 on: July 29, 2020, 07:40:45 AM »
Hi, Alberto,

The tool I used on your icons is Axialis Icon Workshop.  They are having a discount now.  It's $40 US through July 31.  https://www.axialis.com/iconworkshop/  I have also seen Bruce use this tool on some webinars.

As far as I know, Metro Studio is still free.  https://www.syncfusion.com/downloads/metrostudio .  I have not used that much.  I think it is mostly for creating icons from their graphics.
In webinars, I have seen Bruce begin an icon in Metro Studio with their graphics and then bring it into Icon Workshop to alter it.

I don't know enough about icon file structures to fully understand your problem.  I just looked at the code in draw.clw and found that it seemed to be relying on those length bytes in the header.  But icon files appear to be different when their source is a PNG.

Maybe Bruce can figure a way to modify draw.clw so that it does not depend on iconImage.biSizeImage so the method will work even if those bytes are all zeroes.

But at least you have verified that letting Icon Workshop write the icons makes them work. 
If you only have a few icons, I'd be happy to load and re-save them for you.

Cheers,

Jane


michelis

  • Hero Member
  • *****
  • Posts: 1597
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Net Maps Icons problem
« Reply #11 on: July 29, 2020, 07:48:00 AM »
Thanks a lot Jane!
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10174
    • View Profile
Re: Net Maps Icons problem
« Reply #12 on: July 29, 2020, 11:47:51 PM »
Metro Studio is free. I think you are confusing it with their Enterprise Studio product.

https://www.syncfusion.com/downloads/metrostudio