Home AMX User Forum AMX Design Tools

Transparrent Color in Bitmap

I am working in TPD4 for the first time, and I am trying to use some button graphics from my library that I have used in TPD3. I am using the R 255 G 0 B 255 as a background color and I want that color to appear as transparent. Is this achievable in TPD4? I'll be shocked if it isn't. TP is a NXT-CV7.

Thanks,

Joe

Comments

  • viningvining Posts: 4,368
    Yes, if you look in the button properties section you can select "fill color" selecting that will display a pop up which will be either color index, palette or RGB color selections. At the top of that pop up you'll see a drop down window with "choose color by:" at the left. Click the drop down arrow and select what you need. If it's completely transparent color doesn't matter but if you want to set an opacity level use RGB, enter you RGB values and select and opacity value between 0 and 255.
  • vining wrote:
    Click the drop down arrow and select what you need. If it's completely transparent color doesn't matter but if you want to set an opacity level use RGB, enter you RGB values and select and opacity value between 0 and 255.

    Yes, I thought that too. The RGB color that I want to be transparent, is in the bitmap itself. I have that pink color in the corners of the rectangular bitmap and they need to be transparent on the touch panel. When I select Edit Palettes from the Panel menu, I set that RGB color to zero opacity. It has no effect on my bitmaps.
  • In general a bitmap can not be really transparent. The "transparency" color code R:99 G:53 B:99 from TPDesign3 was interpreted by the program as transparent.

    In TPDesign4, you are working with "real" transparency, mostly used with png format. You can not define a color within an image for "use as transparent" within TPD4. If you want to have a specific color as transparency, this must be done with a external graphics tool. The only freeware tool I can remember quickly is "Gimp".

    The color settings within TPD4 have only effect to border/font/background colors but not to the images itself.
  • DHawthorneDHawthorne Posts: 4,584
    I'm pretty sure TPD4 will support transparent gif's, but you do need to set the transparency in the gif itself. Most image editors will let you do that without modifying anything else, and many of them let you select the color you wish to make transparent, so you can just choose the TPD3 color, save it like that, and you are done.
  • One "trick" to use to get your old TPD3 images converted automatically by TPD4 is to use the 'TPD Conversion Wizard' (found in the File menu) to convert a TPD file containing the desired images. Because this process deals only with G3 touch panels and is aware that those panels treated RGB (99, 53, 99) as transparent, it will create 32-bit PNGs from them in the resulting TP4 file with the proper transparency set.
  • Oh where were you last night! ;-) I was able to make a Photoshop automation batch on the whole folder of graphics that...

    Replaced the background of the bmp with a transparent back ground.

    Select every pixel that has a color of R255 G0 B255 and delete it.

    Save image as a PNG

    This worked great. I hit another bump after that though and maybe there is a way to do this that you can tell me...

    I had already used the original bitmaps in the project because I didn't want to stop working...so after I updated the images to PNG, I had to 'replace image' some how. I could not figure out a way to do this in resource manager. Is there a way?
  • I had already used the original bitmaps in the project because I didn't want to stop working...so after I updated the images to PNG, I had to 'replace image' some how. I could not figure out a way to do this in resource manager. Is there a way?

    Absolutely. When you go into the Resource Manager and choose to Import images, you should see a checkbox at the bottom of the Open dialog that reads: 'Overwrite resources with duplicate names'. With this unchecked, subsequent imports of the same image will be automatically renamed 'Copy of ...' or 'Copy (n) of ...'. With it checked, it will do what it says and replace any resource with the same name as the one you are importing.
  • DHawthorneDHawthorne Posts: 4,584
    I had already used the original bitmaps in the project because I didn't want to stop working...so after I updated the images to PNG, I had to 'replace image' some how. I could not figure out a way to do this in resource manager. Is there a way?

    I would be interested to know if such a procedure exists too. I've always (1) imported my new pics, (2) deleted the old ones, (3) gone through the entire stinkin' panel and re-assign images where needed. Part of the problem is the whole "Copy of" thing; if you import an image with the same name as an existing one, it makes a copy with a new name instead of replacing the old. Now, you can turn that off, but I never tried it, and wonder if it will replace the old, or just skip it if the name already exists. I extensively cut-and-paste pages from one panel file to another, and sometimes wind up with 2-3 "Copy of" images in the target file, and most of the time, it's not worth it to go through the thing and take them out (especially if it's something like a transport button graphic and there are multiple instances of them). Even TPD3 handled this badly - it would never replace,just make the "Copy of" thing or nothing. Either way, you had to go through the entire project manually to get rid of redundant images.
  • Open dialog that reads: 'Overwrite resources with duplicate names'.

    This did not seem to work when the file extensions were different.
    The images went from .jpg to .png in resource manager and the overwrite did not take place.
  • TPDesign4 uses the full name of the image file as the resource name. So, myImage.jpg is unique from myImage.png. As the G4 firmware only supports JPEG and PNG images, other formats are converted by TPDesign4 when importing. JPEGs and PNGs remain as-is with no conversion. Formats using 16-bit color or greater will become JPGs, and formats either using 8-bit color or under, or that have transparency, will become PNGs. The only way for your "images [to go] from .jpg to .png" is if the image really was a PNG with a .jpg extension.

    In order for the replace to work, it needs to import as the same format as the image already existing in the ResourceManager without having to perform a conversion. So, if you import myImage.bmp and it is converted to myImage.jpg, subsueqent imports will always become 'Copy of' regardless of the replace setting because the original is NOT the same filename as an existing resource. But importing myImage.jpg, making changes to it, and re-importing with the replace option checked will, in fact, replace the original resource.
  • The images went from .jpg to .png in resource manager and the overwrite did not take place.

    Sorry, bad communication on my part. They didn't change format, the PNGs were added to the resource list while the JPGs remained in place. So would renaming my PNGs to the JPG extensions in fact overwrite the image and retain its PNG format?
  • JimiJimi Posts: 10
    No 'overwrite' checkbox

    Anybody have an idea why the open dialog that comes up when I select import from the resource manager doesn't have the 'overwrite' existing images checkbox described above?

    It's quite anoying to make a small change to an image and not be able to update it by reimporting to TPDesign.
  • DHawthorneDHawthorne Posts: 4,584
    Jimi wrote:
    Anybody have an idea why the open dialog that comes up when I select import from the resource manager doesn't have the 'overwrite' existing images checkbox described above?

    It's quite anoying to make a small change to an image and not be able to update it by reimporting to TPDesign.
    What version of TPD4 do you have? It's there on my copy of ver. 2.6.0 build 509.
  • JimiJimi Posts: 10
    I've got Version 2.6.0 build 509 with border version 3. I just spent some time with tech support making sure that I completely uninstalled my program, wiped the registry and reinstalled it from the web. No dice. The option just isn't there.

    Really strange and really anoying. I'm trying to get ahold of the guy who set up the network and the computers to see if he potentially did anything. But I don't think it's a permissions issue. I have tried from my own account and our office 'root' account with full access.
  • DHawthorneDHawthorne Posts: 4,584
    Jimi wrote:
    I've got Version 2.6.0 build 509 with border version 3. I just spent some time with tech support making sure that I completely uninstalled my program, wiped the registry and reinstalled it from the web. No dice. The option just isn't there.

    Really strange and really anoying. I'm trying to get ahold of the guy who set up the network and the computers to see if he potentially did anything. But I don't think it's a permissions issue. I have tried from my own account and our office 'root' account with full access.
    No, if anything it's a DLL or OCX conflict, as long as there isn't some other setting that affects it. Do you have the "Copy of" option turn off in the program preferences? That's the only thing I can think of that's applicable. If that's off and you still don't get it, I would have to assume a DLL or OCX that TPD4 installs haas been overwritten by a different version that uses different options to turn those controls on and off (which is why they asked you to try a re-install, but that won't help if it is newer than the one AMX is using, or doesn't report its version properly).
Sign In or Register to comment.