English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 12 March 2018, 01:55   #1
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
[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, 02: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, 22:27   #3
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
Any sample image that demonstrates that? Or was it a faith statement?
alkis is offline  
Old 12 March 2018, 22:31   #4
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 19,265
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.
Akira is offline  
Old 12 March 2018, 22:36   #5
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
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, 22: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, 22:43   #7
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
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, 22: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, 22:57   #9
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
Ok, I'll try it. Thanks for the link, btw.
alkis is offline  
Old 12 March 2018, 23: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 13 March 2018, 00:50   #11
malko
Registered User

malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 911
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:	50
Size:	55.7 KB
ID:	57255  
malko is offline  
Old 13 March 2018, 18:32   #12
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
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, 19:11   #13
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
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 20:22.
alkis is offline  
Old 14 March 2018, 00:27   #14
malko
Registered User

malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 911
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:	23
Size:	14.9 KB
ID:	57263   Click image for larger version

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

Last edited by malko; 14 March 2018 at 00:48.
malko is offline  
Old 14 March 2018, 00:34   #15
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 456
cool, thanks for all the combinations you tried!

Updated the plugin on repository, according to feedback!

Last edited by alkis; 14 March 2018 at 00:44.
alkis is offline  
Old 14 March 2018, 00:40   #16
malko
Registered User

malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 911
You are welcome

PS: If you have a Gimp plug-in to create Amiga Icons, it's with pleasure
malko 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 23:33
Amiga Sprite/Tile Cross-Platform Software? diablothe2nd Amiga scene 16 12 July 2013 18:29
XAMOS - new cross-platform rewrite of jAMOS Mequa News 24 14 December 2012 10:49
Cross-platform gui? ceztko request.UAE Wishlist 15 03 January 2008 19:50
Eclipse-Plugin for Amiga-Cross-development Paul News 1 04 September 2004 18: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 14:29.


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