Reply to post

Problem with saving transparency

Author
arqr33
User
  • Total Posts : 2
  • Scores: 0
  • Reward points: 0
  • Joined: 2011/09/24 04:52:34
  • Status: offline
2011/09/24 05:49:02 (permalink)
0

Problem with saving transparency

Dear Administrator.
I have a problem with saving several images containing transparent parts. I 've already attempted variation of 'background color' setting in capture option dialog or 'transparent' checkbox in PNG saving dialog but nothing could solve my problem.
 
The first problem:
When I save captured image to PNG with 'tranparent' box  checked(And 'Clear transparency...on Vista' on setting to remove unnecessary background), I get this image. (Loaded from Adobe Photoshop, 800% magnified)

Rounded corner is transparent, that is exactly what I wanted to do. but please notice on left arrow. It is not transparent part on actual window, but has white(rgb 255,255,255) color. HyperSnap doesn't recognize difference between transparent color of captured image and HyperSnap's background color on capture settings.
When I used other color than white as background color on capture settings, white part of captured image didn't become transparent anymore but another color of image(that I selected on background setting) became transparent.
As a result, I must select a color that doesn't exist on captured image as background color to get correct picture. It's really annoying to find it. And if there is a full-colored image such as color panel, it's impossible to save transparency with all of its colors alive.
 
The second problem:
When I save captured image to PNG with 'tranparent' box unchecked(And I checked 'Clear transparency...on Vista'), I get this image. (Loaded from Adobe Photoshop, 800% magnified)

 
As you can see, rounded corner is filled with white color, not transparency. This is fine. But alpha channel information is still alive. I don't know whether you intended to let it work like this or didn't, it is strange thing that image has alpha channel info even though user doesn't check 'transparent' box.
 
The third problem: 
'Opacity' slide bar of 'Default background color for captures' on capture settings has no effect. I've tested it from 0 to 255, but nothing happened, saved images were same.
 
The second/third problem is not a big deal. I can make its background using other apps such as photoshop. But the first problem is really a bug. It can't be fixed with other applications because original information of image has gone.

Please provide this additional data: 
Exact HyperSnap version in use (from Help/About menu): 7.07.03
Windows version in use: Windows 7 (ver. 6.1.7600) Enterprise K, 64bit, Korean (64bit or Language environment can be an issue?)
post edited by arqr33 - 2011/09/24 06:13:16

4 Replies Related Threads

    Support
    Administrator
    • Total Posts : 4492
    • Scores: 29
    • Reward points: 0
    • Joined: 2010/11/22 17:14:33
    • Location: PA USA
    • Status: offline
    Re:Problem with saving transparency 2011/09/24 06:18:54 (permalink)
    0
    Hi, the alpha channel and "transparent color" are two different methods of doing transparency, usually not mixed together. Alpha is valid for 32 bits per pixel color, transparent color may be set for any color resolution for images saved in PNG or GIF format (maybe some other formats also support it, but I don't know of any other). I'm not sure what is exactly your goal, what exactly you want to achieve. If the image has alpha channel transparency set, best don't add additional transparent color setting. HyperSnap window capture with transparency is not perfect. It's mostly a guesswork, as Windows does not provide a tool to capture transparency. What HS does is capture the same window twice on black and white background and trys to calculate transparency (alpha channel) from that. If there is any animation during that time, it breaks such calculation. If you additionally set white or something else as transparent when saving such image, you'll change all white (255, 255, 255 RGB intensities) to transparent, in addition to other pixels alpha. I don't think there is any error in the code for this, just the imperfections of transparency captue, plus the logical consequencies if you add transparency color to the mix.
    arqr33
    User
    • Total Posts : 2
    • Scores: 0
    • Reward points: 0
    • Joined: 2011/09/24 04:52:34
    • Status: offline
    Re:Problem with saving transparency 2011/09/24 13:57:56 (permalink)
    0
    My goal is to save transparency on rounded corner(and/or absolutely transparent part of window such as holes in window:refer this)+alpha channel on window.
    If I uncheck transparent when save PNG, rounded corner won't be filled with transparency.
    If I check transparent when save PNG, rounded corner will be filled with transparency but additional part of image(that is not transparent) will be filled with transparency.
    Then how can I save transparent corner with alpha-channeled window?
     
    For example, WinSnap  works with rounded corner or custom shape of window perfectly. (although it cannot capture alpha channel of window as it is, but can remove background of alpha-channeled window) Snapdraw is another good example of supporting rounded corner and alpha channel.
    post edited by arqr33 - 2011/09/24 14:07:43
    Support
    Administrator
    • Total Posts : 4492
    • Scores: 29
    • Reward points: 0
    • Joined: 2010/11/22 17:14:33
    • Location: PA USA
    • Status: offline
    Re:Problem with saving transparency 2011/10/03 02:13:25 (permalink)
    0
    Hi,
    to have rounded corners of a window captured as transparent (or other parts of non-rectangular windows as transparent), please click the "Capture Settings" button on the "Capture" tab of the ribbon, then look at the "Default background color for captures". The actual color may be anything, but not the "Opacity" slider next to it, and set it all the way to 0 (zero, left), then click OK and try Window capture command again, or any non-rectangular region catpure (oval, rounded rectangles, freehand).
    Save the image as PNG with 32 bits per pixel color resolution. 
    Greg
    creiglee
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2017/08/09 06:23:07
    • Status: offline
    Re: Problem with saving transparency 2017/08/09 06:54:14 (permalink)
    0
    PNGs create transparency in one of two ways. One of these methods employs the same approach used by GIFs, with a single color defined as transparent, and the other is to set an alpha channel . One of the advantages of PNG single-color transparency is that it doesn't remove a color from the available palette. However, the alpha channel is a much smoother method, as it is far better at blending colors, and allows you to select different levels of transparency in specific regions. The transparent areas of the PNG will blend and adjust naturally to whatever is behind the image when the background of the page isn't a solid white or black color.
    Jump to:
    © 2024 APG vNext Commercial Version 5.1