Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15

Thread: Borders and Frames

  1. #11
    IV Newbie
    Join Date
    May 2014
    Location
    Germany
    Posts
    8
    Version
    IrfanView 4.38
    OS
    64-bit Win 7 Professional SP1
    CPU Cores
    4

    Default

    Image Cook

    This effect is part of IrfanView Filter Sandbox 1.3, which will be released with the next IrfanView version. It's purpose is to make an image look old and worn. The effect is composed of three effects: Color and Brightness, Noise and Dust, and Scratches and Speckles. We'll focus only on Color and Brightness for now, by setting the intensity of the other two to 0%.

    Color and Brightness lets you choose saturation and brightness for the center of the image and it's borders separately.

    Click image for larger version. 

Name:	imagecook0.jpg 
Views:	341 
Size:	34.5 KB 
ID:	4119 Click image for larger version. 

Name:	imagecook1.jpg 
Views:	352 
Size:	985.4 KB 
ID:	4120 Click image for larger version. 

Name:	imagecook2.jpg 
Views:	359 
Size:	983.2 KB 
ID:	4121

    Frame Size: Specifies the shape and width of the frame. The effect uses the same radial gradient as the "Radial Brighten" effect discussed above, so this parameter works in the same way. Lower values make the frame thinner and more square shaped. Higher values make the frame thicker and more circular.

    Center Brightness: Specifies the brightness of the center of the image. A value of 100% means no change, lower values darken and higher values brighten the center.
    Center Saturation: Specifies the color saturation of the center. Again, 100% means no change. Lower values desaturate, higher values saturate it.
    Frame Brightness: Specifies the brightness for the frame. Same function as center brightness, only for the frame.
    Frame Saturation: Specifies the color saturation of the frame. Same function as center saturation, only for the frame.

    If you reduce the saturation around the borders of the image and add some dust and scratches, you can make any image look old and worn:

    Click image for larger version. 

Name:	imagecook3.jpg 
Views:	386 
Size:	908.5 KB 
ID:	4122
    Last edited by jewe.org; 14.04.2015 at 01:45 PM.
    IrfanView Filter Sandbox - Create and share your own image filters and effects.

  2. #12
    Professional User Mij's Avatar
    Join Date
    Mar 2007
    Location
    Camberley, Surrey, UK
    Posts
    2,763
    Version
    IrfanView 4.51
    OS
    32-bit Win 10
    CPU Cores
    3

    Default

    Quote Originally Posted by jewe.org View Post
    I hope I'm not intruding on your thread, Mij. I thought I'd contribute a few border and frame effects for the IrfanView Filter Sandbox plug-in.
    Not at all. I am very pleased to see your contributions here. It seems to me that there are many valuable tools available in Irfanview that are ignored because very few people know how to use them. So I hope that your tutorials will persuade some of them to give the Sandbox plugin a try.

  3. #13
    IV Amateur
    Join Date
    Jun 2016
    Location
    India
    Posts
    12
    Version
    IrfanView 4.33
    OS
    64-bit Win 7 Home Premium SP1

    Default

    Quote Originally Posted by Mij View Post
    Masks can be created from image shapes downloaded from the internet. A good set is Harry's edges available here. http://thepluginsite.com/products/harrysedges/
    Download them and put them into a read/write folder anywhere on the computer.

    To use the masks in Irfanview you must resize them to match the size and shape of the image you want to apply them to and to save as a PNG file using transparency options. The PNG file is then applied to the image as an overlay.

    1.To show the transparency of a PNG file used as an overlay the option "Show PNG/TIF/TGA/DDS alpha/transparent color)" in the Viewing tab of Properties/settings must be set. It is wise to check that has been done before you start.

    Attachment 3656

    2.Open the image file to be masked. Find the folder and choose the Harry's Edge to use as the mask. I double clicked on Star9.png and opened a new copy of Irfanview in another window on top (I have PNG files associated with Irfanview).
    3.Resize the mask to equal the dimensions of the image to be masked. The image dimensions can be read below it in the Status bar.
    4.Save the resized mask with "Save transparent color" selected in the PNG Save options.
    5.When asked to select the transparent color click on the white area in the center.
    6.Close the second copy of Irfanview showing the mask. In the first copy, showing the image, select Edit > Insert overlay/watermark image.
    7.The saved PNG file has been selected as the Overlay/watermark image and the Center option set. Click Preview to see the result and if it looks good click OK.
    8.Save the result.

    Attachment 3657 Attachment 3658 Attachment 3659 Attachment 3660 Attachment 3661 Attachment 3662 Attachment 3663

    The Star9 mask used above is just Black and white. The white area became completely transparent and the black completely opaque. Some of the masks also contain shades of gray which allow some areas to be only partially transparent. In this example we will use one of these, Twirl14.png.

    9 Open another image in Irfanview, then open Twirl14.png in another copy just as in (2) above.
    Then resize the mask to 1600x1200 pixels to match the image dimensions as in (3).
    10 For this example we will have a colored mask. Open Image > Color corrections and move the Red, Blue or Green Color balance sliders to the right to get the mask the color you want.
    11 This time when you save as in (4), also check Save Transparency as Alpha channel in the PNG save options. When asked to select the transparent color click on the white area as in (5) to make that fully transparent.
    12 The overlay is added just as before in (6) and (7) and the result saved.

    Attachment 3664 Attachment 3665 Attachment 3666 Attachment 3667

    Notes:

    (a) You can also use masks bundled with other software applications such as those in the masks folder of Faststone image viewer.
    (b) The purpose of opening the image in a window first, and then processing the mask in a second copy of Irfanview opened on top of it, is primarily so that the image dimesions can be read and used to resize the mask. I find it helps the workflow too. If you find it confusing either close or minimize the first copy after noting down the image dimensions.
    (c) Unless you want to reuse the mask after it has been colored and resized it need only be stored temporarily until it has been used as an overlay. I save all temporary overlay files as mask.png in a Temp folder. That avoids the need to change the name and location in the overlay dialog every time.

    First of all i learned a lot from this thread, so big thanks. Clearly the "transparency as alpha channel" is for gradual transparency change. Transparency of a pixel depends on how 'close' is its color to the color i choose as transparent.
    Now, this works as expected for a mask with black to white transition as in the example u hv given, i.e. if i choose white(rgb=255,255,255) as transparent color, gradual shades of black will be less transparent; fully black(rgb=0,0,0) at the border will be fully opaque. In second example with white to blue transition, transparency calculation is not so straightforward; the full blue part is not completely opaque. Similar is what i see for any other random color combination: i choose color1(r1,g1,b1) as transparent color, then i get partial transparency in some unwanted region, apparently depending how much of (r1,g1,b1) is in those pixels.

    Can i know the formula irfanview uses for transparency calculation? What is transparency of a pixel (r2,g2,b2) if transparent color is (r1,g1,b1)?

  4. #14
    Professional User Mij's Avatar
    Join Date
    Mar 2007
    Location
    Camberley, Surrey, UK
    Posts
    2,763
    Version
    IrfanView 4.51
    OS
    32-bit Win 10
    CPU Cores
    3

    Default

    Quote Originally Posted by rkghadai View Post
    Transparency of a pixel depends on how 'close' is its color to the color i choose as transparent.
    Now, this works as expected for a mask with black to white transition as in the example u hv given, i.e. if i choose white(rgb=255,255,255) as transparent color, gradual shades of black will be less transparent; fully black(rgb=0,0,0) at the border will be fully opaque. In second example with white to blue transition, transparency calculation is not so straightforward; the full blue part is not completely opaque. Similar is what i see for any other random color combination: i choose color1(r1,g1,b1) as transparent color, then i get partial transparency in some unwanted region, apparently depending how much of (r1,g1,b1) is in those pixels.

    Can i know the formula irfanview uses for transparency calculation? What is transparency of a pixel (r2,g2,b2) if transparent color is (r1,g1,b1)?
    I do not know the answer to what you ask. I would probably have created the alpha channel using functions already available in Irfanview such as "Convert to Grayscale" then "Negative > All channels" but it does not seem to be quite that. (In case you do not know, you can extract the Alpha layer for comparison by opening the image you saved and using "Show channel > Alpha" from the Image menu).

    I have never found any use for this alpha layer creation feature other than the one I put in this thread, so the exact way in which transparency is calculated does not seem too important. Personally I think that being able to import an alpha channel that you have created yourself would be a much more useful feature.

  5. #15
    IV Amateur
    Join Date
    Jun 2016
    Location
    India
    Posts
    12
    Version
    IrfanView 4.33
    OS
    64-bit Win 7 Home Premium SP1

    Default

    Quote Originally Posted by Mij View Post
    I do not know the answer to what you ask. I would probably have created the alpha channel using functions already available in Irfanview such as "Convert to Grayscale" then "Negative > All channels" but it does not seem to be quite that. (In case you do not know, you can extract the Alpha layer for comparison by opening the image you saved and using "Show channel > Alpha" from the Image menu).

    I have never found any use for this alpha layer creation feature other than the one I put in this thread, so the exact way in which transparency is calculated does not seem too important. Personally I think that being able to import an alpha channel that you have created yourself would be a much more useful feature.
    as i said my problem is i am getting (partial) transparency in regions where i dont want. Knowing the formula of alpha transparency would help me make educated guess of which colour to choose as transparent colour.

    What i am trying is to do editing on non-rectangular selection in irfanview. [I know better programs exist for that, but nothing better if such a fast program like irfanview can do that.] So i create the selection in paint or irfanpaint, edit the selection as desired, make a mask with the rest of the image (outside the selection) transparent, add this mask as "insert overlay image.." on top of original image.
    What i want: edited selection part comes bcoz of fully opaque part of mask; rest of original image comes bcoz of full transparency.
    Using transparency mask without alpha channel gives a hard edge at the selection boundary; so i use transparency mask with alpha channel, so that the transition is smooth.
    What i get: edited selection part comes but with some of the underneath original image visible, indicating partial transparency there; rest of original image comes bcoz of full transparency.

    So i gather, the issue is which colour to choose as transparent colour that would result in near full opaqueness in a desired region.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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