The Image Editor

The Image EditorThe Image Editor is where you can create your own sprites or edit those you have imported or created previously. If you have used any other image tools then this should be familiar to you but there are a few things to note when using the GameMaker Image Editor which may not be immediately apparent:

Those are just some of the more advanced features that the image editor offers. To find out the full feature range, please read the items below detailing the functions of every part of the editor:

Frame ViewFrame View

This part of the window shows the frames in the order that they will be animated in. You can click the Add Frame Icon button to the left to add further frames - or use the Image Menu - and you can also click and drag any of the frames to change their position along the timeline. In the top left of the Frame View you can switch on Onion Skinning Onion Skin Icon, which means that in a single frame of any sprite animation, you can choose to see any of the preceding or succeeding frames as a semi-transparent layer under the image frame you are currently editing. The great thing about this is that each frame is drawn slightly lighter than the last so you can see how the animation has been progressing from frame to frame while drawing the next one.

Enabling this will show some extra controls over the frames which you can click LMB Icon and drag to set the number of preceding frames to show as well as the number of following frames.

Image Editor Onion SkinYou can set certain properties for onion-skinning from the View conext menu, which is explained further down this page.

Beneath the Onion Skin button, you have the Loop Control button Loop Control Icon used to set whether the sprite loops (goes back to frame 1 when the last frame is reached) or ping-pongs (goes backwards through the frames when the last frame is reached). The Play button Play Icon at the bottom is for starting/stopping the preview of the animation.

You can click on any frame to select it for editing, and a selected frame will have a Delete button Delete Frame Icon at the top corner which you can click to remove the frame from the sprite. You can also click Control Icon / CMD Icon + LMB Icon on multiple frames to select them together, in which case clicking the Delete button will delete all the selected frames. Finally, you can use the standard keyboard shortcuts for Cut, Copy and Paste to edit selected frames: Control Icon / CMD Icon + "X", Control Icon / CMD Icon + "C", and Control Icon / CMD Icon + "V".

 

Frame InformationFrame Information

This bar contains the Frame Information. Here you can set the speed at which the animation frames should be played back using the input box on the left. The frame speed can either be based on "Frames per second", or "Frames per game frame". The total number of frames available are shown to the right along with the current frame that has been selected, and you can collapse this bar (hide it) by clicking on the Collapse Icon icon to the left. You can set this to always start open or always start closed from the Image Editor Preferences.

NOTE The value used here for the animation speed will also set the way the sprite is animated when used in a game, either as a sprite asset on a layer or as a sprite assigned to an instance, although you can modify this at runtime using the appropriate functions and variables.

 

Canvas ControlsCanvas Controls

The canvas controls deal with various aspects of how the main draw canvas and its contents are displayed. The options are:

 

Draw CanvasDraw Canvas

This is the main editing window for your images. Here you can apply any of the tools on the right to paint on the currently selected layer. You can paint with either the left LMB Icon or the right RMB Icon mouse button (and assign a colour to each from the colour picker) and use any of the brushes defined from the top right of the editor. You can also use Control Icon / CMD Icon and the Mouse Wheel MMB Icon to zoom in or out, and pressing Control Icon / CMD Icon + Enter Icon will set the canvas to be 1:1 with the image (or you can use the Canvas Controls as explained above). Note too that you can pan around the canvas using the middle mouse button MMB Icon or Space Icon + LMB Icon.

 

Canvas ValuesCanvas Values

This small bar at the bottom shows the different values for the mouse position and width and height of the selection tools in the editor.

 

BrushesBrushes

Here you can select the brush to paint with. By default you have a selection of different sized square and round brushes to use, but you can easily create your own brush by painting on the image layer, and then selecting the part you wish to use for the new brush and using Control Icon / CMD Icon + "C" to copy it. The copied section will then be added to your brushes and you can paint with it as you would any other brush, and this includes using the different paint tools available like drawing a line.

If you want to remove a brush from the list, simply click on it and press the Delete Key Icon key and it will be removed.

NOTE The default blending colour for the new brush will be white, but if you change the colour with the colour picker and paint using the brush, it will be blended with this new colour.

You can also paste externally from your clipboard (Control Icon / CMD Icon + "V") to create a new brush, which can be changed in the Image Editor Preferences.

To create a new brush from the selection regardless of the setting of Image Selection Copy/Paste, use Control Icon + "B". This shortcut will also work if you have the preference set to Paste as Layer.

NOTE Brushes are not retained between sessions, closing your project will remove any brushes that you have created.

Colour PickerColour Picker

The top of this section has a number or predefined colour swatches that you can choose from, and they can be assigned to the left LMB Icon and right RMB Icon mouse buttons respectively by clicking on them with either button (you can also swap the colours between each button by clicking the arrow icon in beside the swatches). The colours selected will be shown below as swatches beside the image of the mouse, and you can then click these to open the Colour Picker window:

Image Editor Colour PickerFrom this window you can define the colour using any of the available sliders and gadgets, or you can input values directly for the ARGB values or HSV values.

If you hold CTRL/CMD and click LMB Icon on any of the default colour swatches, it will bring up the colour picker tool and allow you to edit the default palette for the sprite. Clicking "OK" in the colour picker in this case will set the palette to the new colour and save it along with the sprite asset being edited.

These colour palettes can then be swapped and applied to different sprites using the colour palette Options menu:

Image Editor Colour Picker Options

The single line of colours below the palette shows your colour history, with your most recently selected colour being on the very left. This section is not copied when using the "Import colours" or "Copy colours" option, as that only applies to the main palette above.

So, you can create a custom colour palette in a sprite image and then use that to set the palette for any other sprite in the Asset Browser, or you can open a sprite image and import the colour palette from any other sprite in the Asset Browser. This sprite palette feature is covered in more detail in the following tech blog:

 

ToolsTools

Below we list the tools that are available by default with GameMaker - note that all tools can be used with the left LMB Icon and right RMB Icon mouse button, and most of them have keyboard shortcuts associated with them (the important ones are listed here along with the tool, but for a full list please see the page on Shortcuts). Most tools will also have extra options that will be visible at the top of the image editor as shown below:

Image Editor Top Bar

Pencil Icon Pencil This is the pencil tool. It uses the selected brush to paint in the selected colour for the mouse button, and you can set the size from the top bar of the image editor as well as enable/disable smoothing (interpolation). Note that you can also resize and scale any brush by holding down Shift Icon + "Z" then clicking LMB Icon and dragging the mouse to change the proportions of the brush, or alternatively select one of the predefined brushes from the top right.
Eraser Icon Eraser This is the eraser tool. It uses the selected brush to erase an area on click from either mouse button. Selecting this will also add extra tools to the top bar of the editor to permit you to scale the brush or enable/disable smoothing (linear interpolation).
Paint Fill Icon Paint / Fill This is the paint bucket (or fill) tool. This will fill in an area of the image based on the chosen alpha tolerance setting, which you can change using the slider shown in the top bar of the editor.
Colour Remove Icon Colour Remove This is the colour remove tool. When you select it, you can then click LMB Icon or RMB Icon on any pixel in the image and all pixels that are of the same colour will be removed (they are technically replaced with the colour black at an alpha of 0). The top bar has a tolerance slider where you can set the pixel colour tolerance - the lower this value the more exact a colour has to match the one that was clicked, while a higher value will expand this to include those colours that are similar to the one clicked. If you have previously made a selection using any of the selection tools, then only clicking on pixels within the selection will have an effect, and only the pixels within the selection will be removed.
Colour Replace Icon Colour Replace This is the colour replace tool. When you select it, you can then click LMB Icon or RMB Icon on any pixel in the image and all pixels that are of the same colour will be replaced by the colour assigned to the mouse button used. The top bar has a tolerance slider where you can set the pixel colour tolerance - the lower this value the more exact a colour has to match the one that was clicked, while a higher value will expand this to include those colours that are similar to the one clicked. If you have previously made a selection using any of the selection tools, then only clicking on pixels within the selection will have an effect, and only the pixels within the selection will be affected by the colour change.
Line Icon Line This tool will draw a line between two points. Click once with either button to create the first point and then click again elsewhere to create another point and join them. The line will be drawn using the selected brush to create the outline, and you can edit some of the brush properties using the top bar of the editor (size, linear interpolation, etc...).
Rectangle Icon Rectangle This tool will draw either a filled or an outlined rectangle. If you click in the top left of the icon, it will be outlined, while clicking the bottom right will be filled and if you require both then you can select that option from the top bar of the image editor (or use Shift Icon + LMB Icon to select one then the other on the toolbox icon), as well as set the size and smoothing of the brush being used. The rectangle will then be drawn using the selected brush. Note that while drawing you can hold down Alt Icon and click to draw from the centre of the mouse position.
Ellipse Icon Ellipse This tool will draw either a filled or an outlined ellipse. If you click in the top left of the icon, it will be outlined, while clicking the bottom right will be filled and if you require both then you can select that option from the top bar of the image editor (or use Shift Icon + LMB Icon to select one then the other on the toolbox icon), as well as set the size and smoothing of the brush being used. The ellipse will be drawn using the selected brush to create the outline. Note that while drawing you can hold down Alt Icon and click to draw from the centre of the mouse position.
Polygon Icon Polygon This tool will draw either a filled or an outlined polygon. If you click in the top left of the icon, it will be outlined, while clicking the bottom right will be filled and if you require both then you can select that option from the top bar of the image editor (or use Shift Icon + LMB Icon to select one then the other on the toolbox icon), as well as set the size and smoothing of the brush being used. You click LMB Icon or RMB Icon to add points to the polygon using the selected brush and when you are happy with the results you should select a different tool to commit the changes and generate the image. The polygon will be drawn using the selected brush. You can press Escape Icon at any time to cancel the polygon definition.
Spline Icon Spline This is the spline tool. It uses the selected brush to create a spline. You click and hold either mouse button to set a point and then drag the mouse to generate the spline, releasing the mouse and repeating to add further points and curves. The spline will be drawn using the selected brush, which can be edited using the top bar of the editor to set size and smoothing. The top bar also has a setting for Iterations which will define how smooth the resulting spline is (lower values will be rougher, higher smoother, and the default value is 10).
Text Icon Text
This is the text input tool. It creates a new text layer where you can type anything you need. You can set the font to use as well as the formatting from the top bar of the image editor.
Dropper Icon Eye Dropper The eye-dropper tool permits you to sample a colour from the image currently being edited.
Select Rectangle Icon Rectangle Selection With this tool you can generate a rectangular selection. You can cancel a selection from the Image menu or pressing Escape Icon.
Paint Selection Icon Paint Selection With this tool you can "paint" a selected area using any of the brushes, including custom brushes. All the same keyboard shortcuts apply as for the Pencil tool. You can cancel a selection from the Image menu or pressing Escape Icon
Magic Wand Icon Magic Wand The magic wand selection tool will select areas of the same colour based on the tolerance value set from the top bar of the editor. If you tick "Colour only" then alpha value will not be taken into consideration. You can cancel a selection from the Image menu or pressing Escape Icon.
Rotate Icon Rotate This is the rotate tool. If you have an area selected using one of the Selection tools, then clicking this will permit you to rotate the selected area by an arbitrary amount from 0° to 360°. If you do not have an area of the image selected then this will permit you to rotate the current brush. To rotate, simply hold down the left mouse button LMB Icon and drag left or right or set the value directly in the top bar. To accept the changes you can press either Enter Icon or select another tool. Note that accepting the change will not change the source material, but rather create a new Brush resource for you to use with the selected image or a brush rotated by the amount you set. Also note that the keyboard shortcut "Z" can be used to rotate any selection or brush by 90° and that this option does not create a new brush and will only affect how the current brush is drawn.
Mirror Icon Mirror This is the mirror tool. Selecting this will mirror the current brush along the vertical axis. This option does not create a new brush and will only affect how the current brush is drawn.
Flip Icon Flip This is the flip tool. Selecting this will mirror the current brush along the horizontal axis. This option does not create a new brush and will only affect how the current brush is drawn.
Pan Icon Pan This is the pan tool. When you select this, you can then click LMB Icon and drag the mouse to pan the layer contents around within the layer. Note that any pixels outside of the draw canvas will not be visible and the image will be cropped to the draw canvas size when you change tool again. Note too that if you have made a selection then the selected pixels will be moved rather than the contents of the layer.

 

Layer EditorLayer Editor

You can create layers in the image editor for different parts of your image, and these layers can be manipulated and drawn to using the various brushes and tools. To create a new layer, simply click the Add Layer Icon icon, and to remove it again the Remove Layer Icon icon. Layers can also be ordered by clicking LMB Icon on a layer and then dragging the layer up or down to the position you require, and you can further organise the layers by creating folders using the Add Layer Folder Icon button and then dragging layers into them.

If you double click LMB Icon on a layer (or use RMB Icon and select Edit Layer Properties) you'll get access to the Layer Properties window:

Image Editor Layer PropertiesHere you can name the layer as well as set the blend mode (the way that it should be "mixed" with the layers beneath), choosing from normal, additive, subtractive or multiply blends. Finally you can set the opacity (transparency) of the layer with a slider, but note that this is cumulative with the actual alpha value of individual pixels - for example, if you have pixels that are 50% opaque and set the layer opacity to 50%, the final pixels will be drawn at 25% opacity.

You can also paste from your clipboard (Control Icon / CMD Icon + "V") to create a new layer, which can be enabled/disabled in the Image Editor Preferences (see "Image Selection Copy/Paste").

 

Apart from those tools within the image editor itself, there are also a number of extra tools available to you from the Menu Bar at the top of the IDE:

Image Editor MenusThese menus are explained in the sections below:

ImageImage

Image Editor Image MenuThe Image menu has the following options (some of which may or may not be available depending on the currrent editor focus):

 

ViewView

Image Editor Views MenuThe View menu has the following options:

 

EffectsEffects

Image Editor Effects MenuThe Effects menu is where you can add your own custom effects plugins, and has the following effects by default: