It is currently Thu Apr 25, 2024 6:24 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Photo Mosaic Python Plugin
PostPosted: Tue Sep 21, 2010 11:45 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
I just downloaded the Photo Mosaic Python Plugin from the GIMPStuff web site.
http://gimpstuff.org/content/show.php/G ... tent=98579
I like the outcome, but the image bleeds/extends beyond the border edge. So I used the color select tool :colsel to select the border, did a selection invert and used the eraser tool :eraser to erase the bleed/over extension. Here are a couple of images.
Attachment:
Mosaic Test(C).jpg
Mosaic Test(C).jpg [ 220.44 KiB | Viewed 8571 times ]

And


Attachments:
Christmas Candle Mosaic (C)small.jpg
Christmas Candle Mosaic (C)small.jpg [ 346.94 KiB | Viewed 8571 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 9:39 am  (#2) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Dang! I didn't know what to name it so I named it photo_mosaic and put it in my plug-ins folder. It doesn't show in Filters > Artistic. I did close and re-open GIMP after saving it, and I did allow it to execute as a program.

On the splash screen when it was being queried in the plug-ins it took a very long time to load. At first I thought GIMP was going to freeze there but then it went on and loaded.

I wish it saved as a file rather opening the plug-in. What do you have it saved as, Greg? Did you put a .py extension on it?

Ignore all the above. I put a py extension on it and it works fine.

PhotoMaster wrote:
I like the outcome, but the image bleeds/extends beyond the border edge.

The final image comes out larger than the canvas. You need to click Image > Fit Canvas to Layers and the image will expand to fit. Then do Ctrl + E to see the full-sized image.

I used the default settings and got this.

Image

Before I started the script I made a copy of the original layer. Ran the script, then on the original layer I right-clicked the layer and scaled the layer to fit the current size. No "holes" in the edges.

Image

If anyone wants the plug-in I saved, download the attached one below. I had to zip and save it for it to upload in here. Be sure to unzip it before putting it into your plug-ins folder.


Attachments:
photo_mosaic.py.zip [2.72 KiB]
Downloaded 347 times
Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 12:05 pm  (#3) 
Offline
GimpChat Member

Joined: Aug 27, 2010
Posts: 491
Interesting ...

Image


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 12:53 pm  (#4) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Very nice, Mike.

This is such a fun plugin.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 1:21 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
Awesome work everyone! They even look good on the phone!

Oregonian, if you notice the image is cut away between each tile, but not along the outside edge. That's what I was mentioning. I, too, love this plugin! So much fun!

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 6:53 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
Here I took the original image (downloaded from the Gimpstuff site), divided it into 4 parts, ran the photo mosaic filter on each part, and put it back together. Viola!


Attachments:
Gimp Mosaic.jpg
Gimp Mosaic.jpg [ 98.72 KiB | Viewed 8498 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 7:18 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
I read through the posts here and thought I'd show what I mean when I talk about overlap.
This image is what I get.
Attachment:
Before.jpg
Before.jpg [ 320.6 KiB | Viewed 8497 times ]

I don't want the parts of the original image that are outside of the border.
This is the image I want. I must manually cut/erase the outer image data.


Attachments:
After.jpg
After.jpg [ 339.44 KiB | Viewed 8497 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 8:05 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
Here is a manual method using the plug-in with no border. Warning! Some settings of the mosaic filter causes a divide by zero error!


Attachments:
Manual Progression.jpg
Manual Progression.jpg [ 551.52 KiB | Viewed 8496 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 8:11 pm  (#9) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Ah! Now I understand, Greg. Yes, it would be nice if that overlapping didn't occur. It takes away from the effect of little snapshots.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 8:43 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Interesting effect to create torn pictures, neat script. =)
Image

Settings
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 8:55 pm  (#11) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Try this, Greg.

Open an image and add an alpha channel. Image > Canvas Size. Unlink w & h. Add at least 50 pixels to both measurements. Click the Center button.

Do NOT do layer to image size. Run the photo mosaic plug-in.

I did this image of an elephant. I added 100px of canvas both ways and did not have any overlapping parts of the image. I filled in a bg layer with blue and cropped it, other than that the image is as it finished up from the plug-in.

Image

This one I added 50px to h & w for canvas. I used the default settings in the filter, and the only change I made was to make the bg color red.

Image


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 9:17 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Wow, this filter is fun to play with. =)
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 9:18 pm  (#13) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I'm loving what you are coming up with, Rod. Good work!!!

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 9:23 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I took a colorful image of a toy giraffe and used pinch and swirl, then i ran The stained glass filter,after that i took out all the inside black lines so i had individual stained glass panels gave it a white bg, then finally i ran mosaic filter.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 10:57 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
As soon as I can get back on my computer, I will try it out! Sounds like it should work.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 11:12 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
Oregonian! You rock! Your technique worked perfectly!!

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Wed Sep 22, 2010 11:17 pm  (#17) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I got a clue when I made this image with a transparent bg and it came out with no bg.
Image

Thought I'd try adding some transparency around an image and see what came out. You can see the results. I think 50px or even less would work fine. Was a lucky :idea:

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Thu Sep 23, 2010 6:31 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
I hate to be the buzz kill, but I ran across the following bug. It is repeatable, at least on my machine. I will send this to the author.


Attachments:
PhotoMosaic Error.jpg
PhotoMosaic Error.jpg [ 332.1 KiB | Viewed 2960 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Thu Sep 23, 2010 6:35 pm  (#19) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I've had that message more than one time. I got another one when I changed a different setting also. It is a buggy plug-in. Time to get out the flyswatter.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Photo Mosaic Python Plugin
PostPosted: Thu Sep 23, 2010 6:40 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
I sent a msg to the author, with the URL for this page, so he can see the error msgs. I know a fair amount of script-fu, but haven't looked into python scripting, so I can't help to fix the problem... yet.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Convert GIMP plugin from Python 2 to Python 3

4

No new posts Attachment(s) Macbook User and Python plugin

14

No new posts Unable to get simple python plugin to show up

8

No new posts Please make a python plugin to combine my GEGL filters with GMIC

1

No new posts Get a mouse click or select a pixel in an image in a python plugin?

3



* Login  



Powered by phpBB3 © phpBB Group