Gimp logo11/23/2023 (gimp-message (string-append "Overlay layer visible before saving: " (if (= (car (gimp-drawable-get-visible overlay-layer)) TRUE) "yes" "no"))) (gimp-message (string-append "Number of layers before saving: " (number->string (car (gimp-image-get-layers image))))) (gimp-message (string-append "Overlay layer position: (" (number->string overlay-offset-x) ", " (number->string overlay-offset-y) ")")) (gimp-message (string-append "Overlay layer size: " (number->string (car (gimp-drawable-width overlay-layer))) "x" (number->string (car (gimp-drawable-height overlay-layer))))) (overlay-offset-y (cadr overlay-offsets)) (overlay-offsets (gimp-drawable-offsets overlay-layer)) ![]() (gimp-layer-set-offsets overlay-layer offset-x offset-y) (offset-y (/ (- image-height overlay-height) 2)) (offset-x (/ (- image-width overlay-width) 2)) (overlay-height (car (gimp-drawable-height overlay-layer))) (overlay-width (car (gimp-drawable-width overlay-layer))) (image-height (car (gimp-image-height image))) (image-width (car (gimp-image-width image))) (gimp-message (string-append "Overlay layer visible: " (if (= (car (gimp-drawable-get-visible overlay-layer)) TRUE) "yes" "no"))) (gimp-message (string-append "Number of layers: " (number->string (car (gimp-image-get-layers image))))) (gimp-image-add-layer image overlay-layer -1) (gimp-message (string-append "overlay-layer: " (number->string overlay-layer))) (overlay-layer (car (gimp-file-load-layer RUN-NONINTERACTIVE image image-file-2))) (drawable (car (gimp-image-get-active-layer image))) (image (car (file-png-load RUN-NONINTERACTIVE image-file-1 image-file-1))) Here is the script with the debugging I've been using to work out why the second image can't be seen in the output.png: (define (overlay-images image-file-1 image-file-2 output-file) (overlay-images "/tmp/bigImage.png" "/tmp/smallImage.png" "/tmp/output.png") The first image provided in the procedure call always shows, but the second image doesn't. We’ve chosen a subtle gray so as not to drown out the shadowing.I'm looking to automate the addition of a small PNG at the centre of a much larger PNG using GIMP (2.8) and its Script-Fu language. At the end, should you feel the white background to not be adequate, you can highlight the Background layer, select the Bucket Fill Tool, and proceed to add a bit of color.Other than that, select the GIMP logo layer and move it into the position you want in the thumbnail. If you choose to do so, the directions are the same. It’s not necessary but we decided to add a shadow to the GIMP logo.Merge Down the Drop Shadow layer on top of your text layer.To avoid a shift in the image, uncheck the box marked Allow resizing before pressing OK.However, since our background is white, black is perfectly fine. ![]() You could change the color of the shadow to make it more visible on the backdrop, say for instance if your background was black it would be better to choose a brighter color.For the thumbnail we selected ‘ 8’ in both X and Y, ‘ 20’ in blur radius, and cranked the opacity to ‘ 100’.We can then drag the image off to the side so that it’s out of the way for our text until we need to reposition it.If you follow the instructions illustrated above, adjust the image width and height to 200px. The layer image is a 1200 x 1200 which is much too large for our primary image at 680 x 400.Select the GIMP logo you downloaded earlier and click Open. ![]() So, open the “File” tab and this time select Open As Layers… just as we did for the arrow during Image Rotation. ![]() The best thing to do is add your additional layer now, that way once we begin adding the text, we’ll be able to adjust it so that it doesn’t block out the image.You can choose to color the background however you like using the Bucket Fill Tool in the Tool Doc, but for now, we’ll keep it white. We should now be looking at a blank (white) canvas.As for the height, we’ll keep it at 400px. Our thumbnails are never any larger than 680px width, so we’ll set our image size as such.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |