Jump to content

Changing Alpha to 1 only where alpha isn't 0?


Recommended Posts

  1. Add a levels adjustment
  2. choose alpha channel
  3. set white level to 0

this will boost all non-zero values to 1, and keep zero untouched.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

You file does not open on iPad, it says contains feature of a later release. Did you use the latest beta to edit the file?

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

What was the process to make the original?

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

please note these observations

  • I could open the file on Photo Beta on Desktop. 
  • boosting alpha will lead to wrong colors at edge pixels. you get over-saturated primary colors, which might distract. additional measures will be required to reduce saturation proportionally to "alpha boost factor" (see screenshot)
  • the document uses mm instead of px as units. the layers are not pixel-aligned, leading to blurriness which actually helps in this case to mitigate the issue above.

Screenshot 2023-07-05 at 08.33.09.png

Screenshot 2023-07-05 at 08.33.16.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

below formulas will A=1/0 will boost only non-zero, and correct colors of edge pixels (but assuming black as backfill color)

The difference becomes relevant when using anything but black as background fill color.

 

You must factor in the intended backfill color if boosting alpha, otherwise the result will be ugly.

 

 

Screenshot 2023-07-05 at 08.35.01.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

4 hours ago, NotMyFault said:

You file does not open on iPad, it says contains feature of a later release. Did you use the latest beta to edit the file?

It opens in the Photo 2.2 beta on my iPad.

Just curious: Is there some reason you're not trying the beta on iPad, too?

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Link to comment
Share on other sites

4 hours ago, NotMyFault said:
  1. Add a levels adjustment
  2. choose alpha channel
  3. set white level to 0

this will boost all non-zero values to 1, and keep zero untouched.

This is exactly what I was looking for ( but the white level has to be at 1% ) :)

My way of setting alpha to "1" wasn't working as I thought it did but the "1/A" did work when using a Procedural Texture, which I think could be better for performance

 

The main reason why I needed this was that I have some cases that require clipping and embedded/linked images/docs don't actually support it. So I make a linked duplicate and use the layer itself to mask itself allowing for clipping, but then the issue arises when you have transparent edges which remove some of the edge.

 

Using the Level Adjustment fixes this by modifying the image to mask the edge of the transparency of the unmodified image.

 

Difference visualized ( you can see how the right has less fur compared to the left )

image.png.dcb48b2500e18fb9d31fa08835ac11ab.png

 

And here is the clipping:

image.png.68cbc0bd761cc431ee7e0bc25b32db38.png

I realized that I actually have to add another clipping mask in this case to match the alpha of the original image that the objects are in.

 

Note: I think embedded/linked images/docs should have clipping by default without having to rasterize them / or having to do all this just to have to clipping for these

 

Link to comment
Share on other sites

14 minutes ago, walt.farrell said:

It opens in the Photo 2.2 beta on my iPad.

Just curious: Is there some reason you're not trying the beta on iPad, too?

Just checked, I still have 2.1.1 - have to find out why it didn’t update  

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.