21 April 2013, 10:09 | #441 |
Paranoid Amigoid
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
|
There you go Peter my friend...
This time is indeed grayscaled Last edited by mfilos; 22 April 2013 at 18:51. |
22 April 2013, 07:26 | #442 |
BlizzardPPC'less
|
Thumbnails dude, THUMBnails!
Great work! I'm addicted to this icon.library, can't switch on my miggy without it |
22 April 2013, 11:17 | #443 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
divu.w #3,d0 to: mulu.w #$5555,d0 ;multiply times the reciprocal/magic value 1/3 (16.16 fixed point) swap d0 ;d0.w is ~d0/3 You don't get a remainder and the accuracy can be off a little in some cases as 16 bits isn't enough for 100% accuracy but it's very close. A longer reciprocal will improve accuracy but a 32x32=64 bit multiply may be necessary to avoid overflow. More accurate version: mulu.w #$aaaa,d0 ;multiply times the reciprocal/magic value 1/3 (15.17 fixed point) moveq #17,d1 lsr.l d1,d0 ;d0.l>>17 is ~d0/3 (16.0 fixed point) Here is how to calculate the 16.16 fixed point reciprocal to use for 16 bit numbers: move.l #$10000,d0 divu.l #constant,d0 ;d0.w is your reciprocal/magic value Don't forget that division by powers of 2 can usually be converted into shifts (watch out for signed numbers though). There isn't much that can be done if the numerator (top number) is a constant or both arguments/ops are variables. I hope it helps. Let me know if you have any questions. Last edited by matthey; 22 April 2013 at 20:40. |
|
22 April 2013, 18:54 | #444 |
Paranoid Amigoid
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
|
EAB doesn't generate automaticaly thumbnails when you insert an IMG tag from an off-site URL... DOES IT?...
The thumbnails are auto generated when you insert an image via EAB's attachment feature. Sadly the attachment quota is rather low, so you'd have to delete every once and a while, which is something I'm actually bored doing. I'm not uploading enormous screenshots. 800x600 resolution is ok for every web browser. Also all screenshots are PNG and between 100-200KB so no bandwidth issues as well. |
22 April 2013, 19:15 | #445 |
Ruler of the Universe
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
|
Your images are perfect mate. Anyway I don't like and don't see any future for these gray scaled icons; I want colour.
Well, if I could have a transparent menu like AfA does (offtopic), then I don't need colours for that. |
23 April 2013, 00:56 | #446 | |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
|
Quote:
Update for mfilos Hey, that's really funny now! You've removed all your images but EAB still remembers the size of them and reserves the space for these screenshots. What a tragedy, it didn't help to remove them to rebuild the thread as expected. So, I hope you don't get upset by this discussion now since I really like your feedback very much and I'm always happy to get any replies here. Hmm, right now, all your images are back again. Was your image server only offline for a moment ?? @matthey Thanks for your suggestions. I've also thought about a solution with simple shifts and adds like this: (D1, D2, D3 holding the RGB bytes as longwords) Code:
ADD.L D2,D1 ADD.L D3,D1 LSR.L #2,D1 MOVE.B D1,D2 LSR.B #2,D2 ADD.B D2,D1 LSR.B #2,D2 ADD.B D2,D1 LSR.B #1,D2 ; correcting rounding errors here ADD.B D2.D1 ; caused by integer devisions with MOVE.B D1,D2 ; shift instructions losing the MOVE.B D1,D3 ; remainder, nearly exact now Last edited by PeterK; 25 April 2013 at 01:07. |
|
23 April 2013, 10:18 | #447 |
BlizzardPPC'less
|
Oh I didn't know there was a quota.
|
23 April 2013, 13:42 | #448 | |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
|
Update to icon.library 46.4.283
Another toy: added the possibility to render grayscale icons. This may look nicer if you use a screenmode with a low number of colors. Try it out. A readme.txt is included in the package. Quote:
Please, tell me if this is what you wanted ? |
|
23 April 2013, 23:27 | #449 |
Paranoid Amigoid
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
|
New version works just fine Peter mate. Just by putting the command in S-S would suffice for grayscale lovers.
This is what the new version (running GrayscaleIcons) looks like. It seems it got the beige color from MagicWB palette (as opossed to the previous ONLY grayscale version). I hope everyone's happy with the thumbnail now... (I'd have to delete a lot more often my images from the attachement space as the quota is rather limited... which also will delete old posts's images but hey...) |
24 April 2013, 02:20 | #450 | |
Ruler of the Universe
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
|
Quote:
Isn't just a link to the photo the same (better)? |
|
25 April 2013, 01:32 | #451 | |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
|
Quote:
How do you get this quota problem? Alright, found it in the attachment statistics but I don't see any problem since I'm cleaning up from time to time @mfilos and Retrofan It's ok to insert small images into the thread. Let's say up to standard PAL resolution (640*512). And you can still reduce the size by cutting out the section with the most important details. PNG is usually better for screenshots than JPG. Last edited by PeterK; 25 April 2013 at 01:46. |
|
25 April 2013, 03:08 | #452 |
Global Moderator
Join Date: Sep 2008
Location: Might as well be WORK :(
Age: 56
Posts: 4,110
|
And when you eventually use all the quota, like I have 2 or 3 times, deleting the ones that aren't important are a real pain + any images within locked threads you'll need to ask a Global Moderator to delete them for you.
I only use EAB's attachment feature for images that I want to keep, otherwise I use an image hosting site like imgur for things that I don't mind being deleted. If there's a problem, or the image sizes interfere with thread reading, then use the thumbnail feature in imgur to show the image and add the url link to the thumbnail that'll point to the main image instead. Like this Remember, Imgur free is a temperary image hosting site and contains limits to 225 images, where the oldest image will be deleted in favour of the newest, 1MB+ images will be auto compressed to jpg and 6 months of 0 views will auto delete the image/s. Last edited by DH; 25 April 2013 at 03:22. |
25 April 2013, 03:55 | #453 |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
|
Thank you DH for pointing out to this alternative solution.
|
27 April 2013, 15:38 | #454 |
Posts: n/a
|
@PeterK
Thank you very much PeterK! This is exactly what I was asking for. Sorry that it took some time for me to reply. Grayscale-support is working very well, at least for me. It is actually an elegant solution to make all the new icon-formats usable on low-color Amigas, even on an Amiga 3000 without a graphics card. It also gives you the possibility to make the Workbench look retro while still using new icons. Remember that the original Amiga colors (from 1.4 and up) was black/white/blue/gray. I guess it is a matter of taste but I really like my grayscale + blue palette. I use 15 shades of gray + dark/pale blue. With the PeterK´s library and grayscale support that blue color is not used on icons, the icons look great. I also place the grays in such an order that original and MWB icons also look gray and good by moving the blue color (which is used on active windows) with VisualPrefs and choosing appropriate grays for all MWB colors. I will post a screenshot one of these days. Again, thanks PeterK. |
28 April 2013, 11:05 | #455 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
(D1, D2, D3 holding zero extended RGB UBYTEs as longwords) Code:
ADD.L D2,D1 ;add green to red ADD.L D3,D1 ;add blue to red LSR.L #2,D1 ;start of division d1/3 MOVE.L D1,D2 LSR.L #2,D2 ADD.L D2,D1 LSR.L #2,D2 ADD.L D2,D1 LSR.L #1,D2 ;rather than LSR#2+ADDX+ADDQ#1 this approximates ADD.L D2,D1 ;end of division d1/3 MOVE.L D1,D2 ;red to green MOVE.L D1,D3 ;red to blue Notice that I switched to all longword operations. It is up to 2x as fast on the 68060 (and possibly future superscalar processors) to use longword operations where possible. Here is a short optimization guide with some hints: http://www.freescale.com/files/32bit...80X0OPTAPP.txt Last edited by matthey; 29 April 2013 at 02:54. |
|
29 April 2013, 00:32 | #456 |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
|
@ClarkKent71
Thank you for your reply. Good to know that it works for you as it should. Nevertheless, I've made a small modification in the next version of icon.library which will be a new Aminet release. I've noticed a very strange system behaviour coming from the use of the GrayscaleIcons instruction. When that was used then it caused a 10% speedloss even with older icon.libraries. This seems to depend on the tag number which I use in the GrayscaleIcons instruction. It was 0x80009064 which caused the slowdown for unknown reason. I still have to analyse that to find out what goes wrong. But since I've changed the tag number to 0x80009063 (1 less) everything works as normal (no speedloss). And I've also changed the name of the instruction and the way it works. It's new name is GrayscaleOnOff which means that it will toggle between fastcolors and grayscale. So you can also switch back at runtime if you like. @matthey I've already changed my code a little as you can see in my older updated posting above. I did that because of the rounding errors coming from the integer divisions which always lose their remainder. Thus, the fourth shift is dividing only by 2 now in order to compensate the rounding errors. But in your new example you are doing that already with the third shift. Maybe you just left out one shift #2 / add pair accidentally. But dividing by two with the third shift already would cause an overflow error: 191+47+23=261. In my updated example I will get 191+47+11+5=254 and another additional divivion by two would even make the result exact, but wasting too much CPU time. Is a long shift or add the same number of CPU cycles on an 68020 as using bytes only ?? Last edited by PeterK; 29 April 2013 at 00:45. |
29 April 2013, 02:53 | #457 | ||
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
Quote:
Yes. Most 68020+ operations are the same number of cycles as a longword except for multiply and divide. Longwords are faster on the 68020 sometimes also. Using (d8,An,Xn.w) instead of (d8,An,Xn.l) requires an extra operation to sign extend the scale register. The 68060 needs to recombine a byte or word result into the old destination register but it's simpler to update the whole register. MULU.W and DIVU.W have a longword (whole register) result even though they are word operation so they are not a problem. It's better to use longword inputs (sign or zero in upper words) for them. That guide I linked has some good examples and tips at the top. It's possible to produce mostly optimal code from 1 assembler source for the 32 bit 68020-68060 in most cases (not so with the 16 bit 68000). Last edited by matthey; 29 April 2013 at 03:02. |
||
29 April 2013, 04:27 | #458 | |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
|
Quote:
I made a mistake too. In order to get the exact result it would, of course, need another division by 4 and not by 2 as I said before. Thanks a lot for your optimization suggestions, I will use longword operations now So, the best solution would be your previous code and an ADDX.L instead of the final ADD.L. Last edited by PeterK; 29 April 2013 at 04:46. |
|
29 April 2013, 05:51 | #459 | ||
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
Quote:
Code:
ADD.L D2,D1 ;add green to red ADD.L D3,D1 ;add blue to red LSR.L #2,D1 ;start of division d1/3 MOVE.L D1,D2 LSR.L #2,D2 ADD.L D2,D1 MOVE.L D1,D2 LSR.L #4,D1 ADDX.L D2,D1 ;end of division d1/3 MOVE.L D1,D2 ;red to green MOVE.L D1,D3 ;red to blue Last edited by matthey; 29 April 2013 at 06:30. |
||
29 April 2013, 07:12 | #460 |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
|
@matthey
Hmm, what should I say now? Perfect solution for this job ! Well done, thanks matt |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ClassicWB Full and icon.library 46.4 | Retroplay | project.ClassicWB | 8 | 05 August 2018 13:57 |
WB library conflict/versions | Amiga1992 | support.Apps | 3 | 22 July 2010 18:47 |
PNG Icon to Color Icon Converter? | Leandro Jardim | request.Apps | 1 | 24 May 2010 04:39 |
What's the latest version of icon.library for OS3.9? | NovaCoder | support.Apps | 3 | 30 June 2009 15:43 |
Requesting icon.library v44+... | nikvest | request.Other | 2 | 16 September 2007 01:58 |
|
|