ArtRage 5 Product PageArtRage Lite Product PageArtRage for iOS Product PageArtRage for Android Product PageArtRage  Android Oil Painter Free Product PageArtRage  Free Demos Page

Results 1 to 2 of 2

Thread: Tutorial: Swapping AR Script Preview Images

  1. #1
    Join Date
    Oct 2007
    Location
    NC, USA
    Posts
    2,874

    Tutorial: Swapping AR Script Preview Images

    Name:  title_pic.jpg
Views: 417
Size:  35.9 KB

    This tutorial is for those members who may have saved an AR script file, without having added a preview image banner to it, or mistakenly added an incorrect banner. These steps will allow you to swap the preview for another one. You may also change the detail information as well (Author name, Title, etc).

    (EDIT) - Just a note on the length of this tutorial. It may look, and perhaps sounds a bit convoluted, but it's really a simple process once you know what you're looking at. So please don't feel to daunted by the amount of steps I have listed. I just wanted to be thorough for anyone new to this sort of thing.

    Before we begin, I should note that this process requires the use of a text editor. This means we're going to be opening the scripts up and tinkering with it's coding. I'd recommend (especially if you're new to any sort of coding) that you copy and back up your script files before you begin. If you don't care for your computer default text editor (mine was Notepad, and I found it bogged down on larger script files), I'd recommend trying out Notepad++. It's a free source editor, so there's no charge for its download and use.

    Okay, so let's get to it...
    1 - Open ArtRage and start a new document.

    2 - If you haven't already done it, create the banner you're going to be adding to the .arscript file that is currently missing one.
    Remember: The Preview Image dimensions should be at 400 x 80 pixels, so that they don't skew when imported.
    3 - With your Preview Image ready, go to File and select Record Script.

    4 - On the Record Script panel, click on Record (leave the Include Current Painting option off).

    5 - Don't draw anything at all, just stop the recording process, now. We only started the recording, to get to the Save Script panel.

    6 - With the Save Script panel on screen, click on the Preview Image box, and use your computers browsing window to locate and load in the Preview image you created in step 2.
    You may choose to fill in the other detail information here, but it can be changed in a later step, as well.
    7 - Click OK on the Save Script panel, and save the script with a unique name (DO NOT OVERWRITE YOUR OLD SCRIPT). I called mine "sub" as a reminder that this script only has a preview image in it, which I'm going to be swapping to another script after.

    8 - Now to take a look at the script code. Open your .arscript files in the text editor of your choice. The two files I'll be using for my examples are Eye Script.arscript and sub.arscript. The Eye Script file is my original script, which is missing its preview image. The sub file is the one that I saved the preview image to (Steps 6 - 7).

    9 - With your script files opened in your text editor, you're going to need to locate the <Header> </Header> tag blocks in each script. You'll notice that the one in your original script will be much smaller, if you didn't have a preview image in there to begin with. This is because the image binary code takes up a big chunk of space at the end of the code block. Below is a screen shot of my two scripts, side by side. I have outlined the Header blocks with a red box, and highlighted the preview image binary code in green, so that you'll have an idea of what you're looking for. Remember: We're only interested in the code between the <Header> and </Header> tags of each script, for the purposes of this tutorial.

    Click image for larger version. 

Name:	header-block.jpg 
Views:	171 
Size:	409.5 KB 
ID:	58858

    10 - Now it's time for the code swap. You want to locate and select the Preview Image code within the script that saved an image to (in my case, the "sub.arscript"), and then copy it (Hold "Ctrl" and Hit "C"). The code should be easy to find, because the gents at AR conveniently tagged this as "Preview Image{lots of binary code here}". So select everything starting from just before the "P" in Preview, to just after the end brace "}" (see screen shot below, where the required script code is highlighted in gray). Note: You may need to do some scrolling to get all of the code selected. In my screen shot, I lopped some of the binary out, so I could fit the start and end of the code block into a single image, for display. DO NOT LEAVE OUT ANY OF THE BINARY yourself, or your image won't work.

    Click image for larger version. 

Name:	select-preview-code.jpg 
Views:	156 
Size:	237.6 KB 
ID:	58859

    11 - Now that you've copied the Preview Image code, go to your script file that needs it, and paste the code in under the Script Feature Flags: 0x000000000 code line, by Holding "Ctrl" and Hitting "V". You can see where I pasted my code (highlighted in green) under the line of my Eye Script.arscript in the screen shot below).

    Click image for larger version. 

Name:	paste-code.jpg 
Views:	178 
Size:	255.8 KB 
ID:	58860

    12 - If you wish, you can now copy and paste the other details (Author name, Comment, etc) from one file to the other, as well. Or you can just hand type in something new.

    Click image for larger version. 

Name:	transfer-other-data.jpg 
Views:	179 
Size:	185.4 KB 
ID:	58861

    13 - Once you have changed everything to your liking, save the script file (I recommend you use Save As and give it a new name, so you don't overwrite the old file), and you'll be ready to try it out in ArtRage.
    Last edited by Someonesane; 08-11-2011 at 01:46 PM.
    Nothing is easy to the unwilling.

  2. #2
    Join Date
    Mar 2009
    Location
    Rio de Janeiro
    Posts
    5,897
    Wow, SOS terrific, thank you very much. Great stuff.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •