English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 07 February 2015, 09:16   #121
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Dear Peter

please have a look at the attached image in that post again:

http://eab.abime.net/showpost.php?p=...&postcount=109


The left Image is the result after 1000 iterations. But as far I can see the transparency only vanishes where the image is black. The parts of the 'scratches' surrounded in gray look still somehow partially transparent. Do you get what i mean? Is this correct?

thanks
A
AGS is offline  
Old 07 February 2015, 13:02   #122
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,374
Hi AGS,

please make a better example. It should consist of the foreground image, the background image, the alpha channel image, a composite image of all three images and maybe some more after several iterations. Use red and green for the foreground and different shades of blue for the background. The alpha channel should have some smooth fades from black to white and also some gray objects with values of 50, 100, 150 and 200.
PeterK is offline  
Old 07 February 2015, 13:09   #123
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
PeterK, one image with all included you mean or separate images of everything?
AGS is offline  
Old 07 February 2015, 13:17   #124
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,374
Sorry for my poor English, but I would like to have at least four seperate images to make it easier to explain what really happens and to see which formular works correct or wrong.
PeterK is offline  
Old 07 February 2015, 14:25   #125
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Your English is Ok, I just can't see which of the four images should contain what and what not. Please could you explain for me more detailed what image 1 should contain and what image 2 and so on.
AGS is offline  
Old 07 February 2015, 14:37   #126
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,374
1. the foreground image, in red and green
2. the background image, in blue
3. the alpha channel image, with fades from black to white and some simple gray objects
4. a composite image of all three images (1-3) above made with an image processing program
PeterK is offline  
Old 07 February 2015, 15:08   #127
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Before I start, please let me check if I understand correctly. You would like to have some image using only the colors red and green, then some other image only using blue, then an alphachannel only image with a gradient and some gray figures, and then a combination of the three? That combination should combine all channels, right? But when I follow your instructions as far I can understand them, then there are not four images but only three (red and green is in one) ... for a destination that should have four channels? I do not understand what to do here.
AGS is offline  
Old 07 February 2015, 15:28   #128
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,374
The foreground image is a 24 bit RGB, most parts in red and green
The background image is a 24 bit RGB, most parts in blue
The alpha channel is 8 bit gray scale

And the final PNG output brings all as a 32 bit ARGB together. So difficult?

Ok, I must admit to have some problems with PSP8 to create an ARGB. The attached combined image is only RGB now.
Attached Thumbnails
Click image for larger version

Name:	Foreground.png
Views:	164
Size:	58.8 KB
ID:	43146   Click image for larger version

Name:	Background.png
Views:	161
Size:	48.3 KB
ID:	43147   Click image for larger version

Name:	Alpha.png
Views:	168
Size:	49.0 KB
ID:	43148   Click image for larger version

Name:	Combined.png
Views:	169
Size:	165.5 KB
ID:	43149  

Last edited by PeterK; 07 February 2015 at 16:55.
PeterK is offline  
Old 07 February 2015, 15:29   #129
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
what i'd like to ask for, is comparison between different numbers of iterations. what are you actually doing here, drawing the grey scribbles over the top a thousand times? i'd like to see just one time, two times, ten times, a hundred times perhaps.
Mrs Beanbag is offline  
Old 07 February 2015, 22:54   #130
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
It was really hard to understand for me. So as we now have the images, what should I do with them or do next?
AGS is offline  
Old 07 February 2015, 23:22   #131
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
actually when i think about it the result is not entirely inexplicable, for instance look at this
Mrs Beanbag is offline  
Old 08 February 2015, 00:26   #132
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,374
Quote:
Originally Posted by AGS View Post
It was really hard to understand for me. So as we now have the images, what should I do with them or do next?
Hmm, I thought that you wanted to check if your alpha blending formular in posting #109 works correctly?

Use the attached ARGB.png image for your input in A0
and the background.png image for the array in A1
and then calculate the result for 1, 10, 100 iterations etc ...

Code:
;==============================================================
; apply alpha blending from an ARGB buffer into an RGB buffer
;==============================================================

calc_pixels	; apply ARGB data onto RGB data

		; a0	in ARGB image
		; a1	in RGB array
Update:

Oh dear!

Now, I noticed that you have changed the code in your old posting #109 without telling me about these modifications. Sorry, but I didn't expect such changes in an old posting, because it destroys the chronological progress and leads to confusion if somebody corrects his historical statements after several months without adding an "update" note.

Of course, you can use both formulars in your routine (optional selectable). Nevertheless, the verification of your old code shows that half of the results have the wrong roundings.
Attached Thumbnails
Click image for larger version

Name:	ARGB.png
Views:	169
Size:	164.9 KB
ID:	43158   Click image for larger version

Name:	Background.png
Views:	168
Size:	48.3 KB
ID:	43159  

Last edited by PeterK; 09 February 2015 at 23:36.
PeterK is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tool to convert asm to gnu asm (gas) Asman Coders. Asm / Hardware 13 30 December 2020 11:57
TCP/IP stack: Most optimized//small? Amiga1992 support.Apps 17 14 June 2008 00:42
Optimized Protracker playroutine? Photon Coders. General 10 11 June 2005 00:54

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:05.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14695 seconds with 16 queries