Jump to content
PeterT

High Res Tool Icon

Recommended Posts

On another note, when pasting in a 26x20 pixel tool Icon in the Edit Definition Properties tab, how do you get a high resolution Icon.  I made my Icon in Graphic Converter, but when I pasted it in, I got some sort of a message saying that it would be a low resolution Icon if I do not make a high-resolution counterpart, or something like that.

 

What is the technique to get a high resolution tool Icon?

Share this post


Link to post

Save a copy of the image at double the resolution and append "@2x" to the image file name. VW will search for the second image in the same directory. 

 

Hth,

Josh

Share this post


Link to post

Josh,

 

As you Paste the image into the Properties dialog, what directory do I put the High res image into?  Where does Vectorworks store the image that was pasted in?  Is that where I need to put the high res image?

 

Thanks,

 

Peter

Share this post


Link to post

Hi Peter,

 

The regular and high resolution images just need to be in the same folder before you import. Select the regular image with the Import PNG Icon..: dialog, and VW will automatically pull in the high res as well. No need to find where VW stores the image. 

 

-Josh 

  • Like 1

Share this post


Link to post

Josh,

 

Since Vectorworks and the Plug-ins reside on seven different workstations in my office, are you suggesting I put two image files on each of seven workstations? Or can a workstation copy of Vectorworks pull the icons from our server? I typically Paste the icon in on my workstation, how will the other workstations find it?

 

Is there anything about this on the Developer Page? I have not seen it.

 

Peter

Edited by PeterT

Share this post


Link to post

Hi Peter,

 

It's much simpler than you are describing.  The icon gets embedded into the plug-in, so after you select the icon with the [Import PNG Icon...] button, you're done.  You could even delete the original icons from your workstation if you would like, but the embed process means you can't retrieve an icon from a plug-in.

 

Example workflow:

- Create an icon at double resolution.

- Save as MyIcon@2x.png

- Using your image editor, reduce the resolution in half

- Save as MyIcon.png in the same folder as MyIcon@2x.png

- In VW Plug-In Manager -> Edit Definition -> Properties, press [Import PNG Icon...]

- Select MyIcon.png

At this point both MyIcon.png and MyIcon@2x.png embed in the plug-in.

 

As a side note, SDK based plug-ins deal with the icon differently, so don't be confused by any information you may find about adding icons to .vwr files.

 

HTH,
Josh

Share this post


Link to post

O.K,

I am about to give up on this.  I have a 26x20 pixel PNG Icon named BLIcon.png, and a 52x40 pixel PNG icon named BLIcon@2x.png.

 

I Open the BLIcon.png file in Preview, Photoshop, or Graphic Converter and they all tell me it is a 26x20 PNG file.

 

In VectorScript I hit the Import PNG Icon... button, select the BLIcon.png  file, and get the message that "The PNG file is the wrong size. The dimensions must be 26x20 pixels".  I have verified 20 times that it is a 26x20 PNG file yet VectorScript sees it as something else.

 

I cannot spend my whole day trying to import a stupid ICON.

 

I guess I will just have two accept the low res icon since VS will not take the file that it asks for.

 

Here are the two Icons, as I do not know where to go from here.

BLIcon.png.c42ac41fe3d6d534b89d444b56cf9c25.pngBLIcon@2x.png.5b236feaf0d772df4b1281d6fb72744d.png

Edited by PeterT

Share this post


Link to post

Peter,

   I just copied the two images you posted and saved them from Preview to my desktop, naming them appropriately as A.png and A@2x.png. They imported as I expected and invoked no error message. I saved them twice, with and without the alpha channel, but VW imported both versions the same. I am not sure where your problem lies, but I don't think it is with the image files.

 

Raymond

Share this post


Link to post

Raymond,

 

I do not know how you got them to import.  I get the same message every time.  I even renamed them the same as you did.

 

Peter

 

Screen_Shot_2017-04-07_at_8_57.41_AM.png.8898620a41796cd8b35dbdd1398ecea4.png

Share this post


Link to post

I think my last reply didn't go through.  Check that both images are at 72 dpi.  I found that even if the pixel dimensions are correct, if they are not set for screen resolution, VW will produce an error.  Also just confirm that your @2x version is 52 x 40 @ 72 dpi.

 

-Josh

Share this post


Link to post

OK,

 

I had them both at 600 dpi.  I do not understand how you can have a high resolution image at 72 dpi and only 26 x 2o pixels.

 

I will reduce them to 72, but that does not sound high resolution to me.

 

Peter

Share this post


Link to post

High resolution specifically refers to displays, like Apple's retina displays, that have twice as many pixels per inch.  Because the icon size is the same display size on both kinds of screens, 52 x 40 is twice the resolution of 26 x 20, and in comparison, high resolution (or at least 2x resolution).  In theory, keeping the image the same measured dimensions, say in mm, but changing the dpi from 72 to 144 should work, but even though the pixel dimensions are incorrect, VW is finicky about it.  Personally, I think VW should just look at the pixel dimensions and not the dpi, but that doesn't look like it will change any time soon.

 

The @2x concept is actually a graphics standard and not unique to VW: https://developers.google.com/web/fundamentals/design-and-ui/media/images#relative-sized-images

 

-Josh

Share this post


Link to post

72 DPI resolution killed me too.

If only it was mentioned in the dialog that says to use a 26 x 20 pixel image

Thanks Josh

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...