You are here

Map Style

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
plugin-map-style.py.txt16.59 KB
ufo-grass-example.jpg19.44 KB

Users Guide
___________

What this plugin does:

Transfers artistic style from one image to another. Often the source is an artistic image and the target is a realistic, photo image. But you can also transfer between artistic images or between realistic images.

An artist might say this plugin "renders in the media and style from another image." A computer user might say it "renders in the theme of another image."

Transferring style means transferring small scale features (color and texture) to an image while retaining large scale features (objects.)

Map can mean "transfer and transform". This plugin gives limited control of the transform. That is, colors are usually mapped to similar colors (hues.) This plugin is not intended to do "false color" (but it might have that effect.)

Style can mean "color and surface." Texture mapping usually means just surface (pattern of brightness, e.g. a weave or grain.) This plugin can transfer both color and surface.

This plugin has more effect than just an overlay or screen or a map. A screen usually applies a texture uniformly across an image. This plugin transfers style in patches. The style in a region can come from any patch of the source, or be synthesized (mixed) from many patches of the source.

The transfer is not exactly a copy, again because of optional synthesis or mixing.

About the selection:

Usually you transfer between separate images, the target and source images. You can make a selection in either image, or both. If there is no selection, the plugin uses the entire layer.

The target is the active LAYER and you can choose the source LAYER. Note that the plugin doesn't use everything visible in an image, just one layer.

SPECIAL CASE: If the target and source layers are in the same image, the source style comes from the inverse of the selection in the source layer. Similarly, if the target and source layers are the same layer, the target is the selection and the style comes from the inverse of the selection, i.e. outside the selection. In this case, the effect is little if there is no difference in texture between the inside and outside of the selection, or a distort, if there is a difference.

About the settings:

"Percent transfer:" how much style to transfer. Less transfer means the effect retains the large scale objects of the original, but gives the image a grainy surface. More transfer means the effect leaves only a ghost of the large scale objects, and almost fully copies the style image (with less synthesis or mixing.)

"Map by:" whether color affects the style transfer, when both target and source are in color. If you choose "color and brightness", style colors are more apt to be transferred to areas with same colors. However, it is still possible that colors are radically transformed, if the surface (brightness pattern) is a better match. If you choose "brightness only", style colors are more apt to be radically transformed.

This setting has less effect if there are no color matches between source and target (e.g. one is all red and the other is all green) or if the target image is GRAY. This setting has NO effect if the source image or both images are GRAY.

About modes:

You can transfer style between any combination of RGB and GRAY images. The plugin changes the mode of the target to the mode of the source as necessary.

Why this plugin:

This plugin is a front-end to the separate resynthesizer plugin. This plugin simplifies using the resynthesizer plugin. It automates many steps. It hides several complexities of the resynthesizer plugin: selection, modes, alpha channels, and settings.

The best examples are at the resynthesizer author's site:
http://www.logarithmic.net/pfh/resynthesizer/theming

This is an example of an image, a source, and the result of the plugin at 50% transfer:

Standard installation instructions apply.

Appears as Filters.Map.Style

Code License: 
GIMP Version: 
Scripting Engine: 

Comments

I don't understand how to install this.
Don't I need an EXE?

Read the comments below. This plug-in requires Python to be installed and recognized by GIMP. There is a .txt at the end of the file, that shouldn't be there, it should be removed, leaving the extension with *.py and then placed in your .gimp-2.6/plug-ins folder.

I don't have python installed, but it's not that difficult to do this manually (use to do this all the time; not so much anymore). Still like this feature with Resynthesizer. :)

Nice script

Even if quite boring do it ,it seems better add a warning:
the script has to be renamed from plugin-map-style.py.txt to plugin-map-style.py or will never work

It is not your fault but a bug in this side that add that txt extension, anyway better advice users

I used your images for testing and got this error:

Traceback (most recent call last):
File "C:\Program Files (x86)\GIMP-2.0\lib\gimp\2.0\python\gimpfu.py", line 692, in response
dialog.res = run_script(params)
File "C:\Program Files (x86)\GIMP-2.0\lib\gimp\2.0\python\gimpfu.py", line 353, in run_script
return apply(function, params)
File "C:\Users\mahvin\.gimp-2.6\plug-ins\plugin-map-style.py", line 345, in transfer_style
pdb.plug_in_resynthesizer(image, drawable, 1, 1, 1, source_drawable.ID, source_map.ID, target_map.ID, map_weight, 0.117, 9, 200)
TypeError: wrong number of parameters

maybe the problem is that are 2 version of resynthesizer around, requiring different number of parameters

I was waiting for someone to answer. I can't use version .16, it doesn't work correctly, so I had to revert back to .13.

Hopefully this can be remedied easily! (fingers crossed) The plug-in seems rather cool. :)

EDIT:

You were correct, PC. It uses version .16.

why 1.6 doesn't work correctly
it introduced some bug or what ?

PS Resynthesyzer really need a mantainer

I am in progress of rewriting resynthesizer in C. (The consensus is that it must be in C instead of C++ for any hope of getting it part of a Gimp release.) I have a working C version, but more work to do to get it up to Gimp standards.

One reason I have released several plugins that are front-ends to the resynthesizer (Render.Texture and Map.Style) is that I am automating testing of many use cases for the resynthesizer. I make changes to the engine, than run the testsuite of plugins that call it.

I am working in a crude build environment. The next hurdle is a build environment using Gimp project tools.

No promises.

in case i may suggest to

1) extend the output options ( = Active layer , New layer , New Image )

2) slightly change the registration path so all related scripts could be listed in the same submenu

Pages

Subscribe to Comments for "Map Style"