English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 12 March 2018, 00:55   #1
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
[cross-platform] Gimp python plugin to bring image near OCS color resolution

I've hacked this plugin this evening

https://github.com/alexalkis/palette_amigaOCS

Only tested on linux.
alkis is offline  
Old 12 March 2018, 01:40   #2
Vousti
Banned
 
Join Date: Mar 2018
Location: Finland
Posts: 36
A better tool already exists...

http://mrsebe.bplaced.net/blog/wordpress/?page_id=374
Vousti is offline  
Old 12 March 2018, 21:27   #3
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Any sample image that demonstrates that? Or was it a faith statement?
alkis is offline  
Old 12 March 2018, 21:31   #4
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,644
I guess both things are different. This script does not do HAM stuff (HAM is not straight bitplane conversion), but it's a handy way for people who use GIMP to convert images to Amiga-friendly formats.

Personally I use a combination of tools. XnView also does a decent job of color reduction with different dithering and exporting to IFF. It'sa good, cross-platform option, super fast and with a small footprint.
Amiga1992 is offline  
Old 12 March 2018, 21:36   #5
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
It's handy to have in a paint program cause you can do modifications to fix things. Anyways, I needed an approximation of how it would look in OCS.
alkis is offline  
Old 12 March 2018, 21:40   #6
Vousti
Banned
 
Join Date: Mar 2018
Location: Finland
Posts: 36
ham_convert does much more than just HAM stuff. Just check the link and don't make prejudicious comments. And last but not least, try the software yourself!
Vousti is offline  
Old 12 March 2018, 21:43   #7
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Huh? What prejudicious comments? It was a honest question, do you have a sample image that shows what you are stating or are you saying something on faith?
alkis is offline  
Old 12 March 2018, 21:51   #8
Vousti
Banned
 
Join Date: Mar 2018
Location: Finland
Posts: 36
Quote:
Originally Posted by alkis View Post
Huh? What prejudicious comments? It was a honest question, do you have a sample image that shows what you are stating or are you saying something on faith?
I have tested the software and the results were convincing.
It's Java software so few people may not want to use it.

You should try the software yourself, I'm not going to generate any previews...
Vousti is offline  
Old 12 March 2018, 21:57   #9
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Ok, I'll try it. Thanks for the link, btw.
alkis is offline  
Old 12 March 2018, 22:30   #10
Vousti
Banned
 
Join Date: Mar 2018
Location: Finland
Posts: 36
Atkinson dithering is probably the best. Palette generation modes 0-7 will help remove color artifacts.
Vousti is offline  
Old 12 March 2018, 23:50   #11
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,856
Does anyone managed to make it working with Gimp 2.8 on Windows ?
Tried in both plug-in folders* but nothing appears in the menu EVEN if I can see the filename when the application start...

*edit -> settings -> folders -> plug-in,
%USERPROFILE%\.gimp-2.8\plug-ins
%ProgramFiles%\GIMP2\lib\gimp\2.0\plug-ins
Attached Thumbnails
Click image for larger version

Name:	gimp-greffon-.png
Views:	220
Size:	55.7 KB
ID:	57255  
malko is offline  
Old 13 March 2018, 17:32   #12
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Quote:
Originally Posted by malko View Post
Does anyone managed to make it working with Gimp 2.8 on Windows ?
Tried in both plug-in folders* but nothing appears in the menu EVEN if I can see the filename when the application start...

*edit -> settings -> folders -> plug-in,
%USERPROFILE%\.gimp-2.8\plug-ins
%ProgramFiles%\GIMP2\lib\gimp\2.0\plug-ins
Hmmm, works for me on clean 2.8.22 install if I copy the .py file in C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins

(Windows 10/64 bit)
alkis is offline  
Old 13 March 2018, 18:11   #13
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Quote:
Originally Posted by malko View Post
Does anyone managed to make it working with Gimp 2.8 on Windows ?
Tried in both plug-in folders* but nothing appears in the menu EVEN if I can see the filename when the application start...

*edit -> settings -> folders -> plug-in,
%USERPROFILE%\.gimp-2.8\plug-ins
%ProgramFiles%\GIMP2\lib\gimp\2.0\plug-ins
Hmm, can you edit with a text editor the script and change (near the bottom of the file)
menu="<Image>/Filters/Render"
to
menu="<Image>/Filtres/Rendu"

Second hmm, try changing it to cause it wouldn't make any sense to go with the first replacement
menu=N_("<Image>/Filters/Render")

Last edited by alkis; 13 March 2018 at 19:22.
alkis is offline  
Old 13 March 2018, 23:27   #14
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,856
Quote:
Originally Posted by alkis View Post
Hmm, can you edit with a text editor the script and change (near the bottom of the file)
Code:
menu="<Image>/Filters/Render"
to
menu="<Image>/Filtres/Rendu"
Second hmm, try changing it to cause it wouldn't make any sense to go with the first replacement
Code:
menu=N_("<Image>/Filters/Render")
I opened the file with Programmer's Notepad (has a syntax add-in for python).
A search on "Filters/" returned only one occurrence in line 970 !
Line 970 ? I thought your script was smaller....
So I had a look again in github. Script has 122 lines... So what happened ???

After looking a bit I understood what happened.
When downloading your file, I right-clicked on the palette_amigaOCS.py file to "save as...". Bad idea .
So I deleted the file on my system and clicked on "Clone or download" in github, got the zip file and extracted it.

Now the palette_amigaOCS.py on my system has 122 lines .
Ok re-loaded Gimp... drum roll... No, no entry in Filter/Render menu .

Changed the entry as proposed :
menu=N_("<Image>/Filters/Render") -> menu=N_("<Image>/Filtres/Rendu"))
Re-loaded Gimp... drum roll... No, no entry in Filter/Render menu BUT a new menu "Filtres" is present and has a "Rendu" sub-menu . (see first thumbnail)

I then opened another Gimp plug-in to see how the menu line is written. I opened the file foggify.py . It is written as : menu="<Image>/Filters/Render/Clouds",.
So I changed the menu line as : menu="<Image>/Filters/Render" (in English) and re-loaded Gimp... drum roll... No, still not here
Tried the option to re-load the scripts-fu... waited 15 seconds... drum roll... YES !!! finally it's here ! . And stay there each time I launch Gimp . (see second thumbnail)

So to sum up on my config (French Gimp) for your plug-in to be displayed where you expected it : "/Filters/Render" has to be kept in English, no "N_(" notation, and re-load of the script-fu used.

With all of this, I still haven't tested your plug-in... !

Edit: When re-reading my post I noticed a misprint in the screenshot... Who will see it ?
Attached Thumbnails
Click image for larger version

Name:	gimp-greffon-2.png
Views:	169
Size:	14.9 KB
ID:	57263   Click image for larger version

Name:	gimp-greffon-3.png
Views:	174
Size:	28.4 KB
ID:	57265  

Last edited by malko; 13 March 2018 at 23:48.
malko is offline  
Old 13 March 2018, 23:34   #15
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
cool, thanks for all the combinations you tried!

Updated the plugin on repository, according to feedback!

Last edited by alkis; 13 March 2018 at 23:44.
alkis is offline  
Old 13 March 2018, 23:40   #16
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,856
You are welcome

PS: If you have a Gimp plug-in to create Amiga Icons, it's with pleasure
malko is offline  
Old 30 April 2020, 01:32   #17
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,856
Just a feedback to say that the plug-in is also working with latest GIMP (2.10.18)
malko is offline  
Old 18 September 2022, 13:50   #18
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,856
Still works with latest GIMP 2.10.32.
malko is offline  
Old 19 September 2022, 13:33   #19
rothers
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 487
Do you plan to add HAM support? It would very much help me with my HAM game.
rothers is offline  
Old 19 September 2022, 16:24   #20
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Quote:
Originally Posted by rothers View Post
Do you plan to add HAM support? It would very much help me with my HAM game.
Ham needs other kind of logic from current implementation. I'll look into it, but no promises.
alkis 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
An iff image plugin for KDE4 alkis Coders. General 0 20 July 2013 22:33
Amiga Sprite/Tile Cross-Platform Software? diablothe2nd Amiga scene 16 12 July 2013 17:29
XAMOS - new cross-platform rewrite of jAMOS Mequa News 24 14 December 2012 09:49
Cross-platform gui? ceztko request.UAE Wishlist 15 03 January 2008 18:50
Eclipse-Plugin for Amiga-Cross-development Paul News 1 04 September 2004 17:36

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 09:14.

Top

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