Gunter Bachelier on wrote... | Dear Anthony Thyssen, | | > Use gravity... | > convert p3m1_G2b.png -gravity East -crop 1501x1300+0+0 p3m1_G2.png | | I have tried this but -gravity East cuts something at the top of the | image, it works with -gravity NorthEast (there might be an additional | problem with the geometry values, see below). | | Sorry yes you will want North East to place your crop relative to the top right corner.
| > convert -size 2250x1300 xc: \ | > -page -750+0 p3m1_G6.png \ | > -page +0+0 p3m1_G1.png \ | > -page +750+0 p3m1_G2.png \ | > -page +1500+0 p3m1_G5.png \ | > -flatten p3m1_tile_part.png | > | > I get the right result (after I fixed the +repage after crops). | | the good news is: it works in principle and it is very (!) fast: | | http://www.vi-anec.de/Trance-Art/IM-examples/IM-plane_group_p3m1/p3m1_tile_part_flatten.png | (10 MB) | | the bad news is: with the given geometry values it has (white) pixel | artifacts at the edges where the images come together (even at the | bottom - top??). The seamlessness is the crucial attribute therefore | no compromise can be done here. | The tile_part that was generated with my original sequence has | a width of 2252 where this tile_part has the predefined width of 2250. | The artifacts can be seen after the tile is generated from the tile_part: | | http://www.vi-anec.de/Trance-Art/IM-examples/IM-plane_group_p3m1/p3m1_tile_flatten2.png | (40 MB) | File not found. But I understand your point. It mat be that you will need to adjust the image diagonals to overlay correctly.The colors of the pixels along the two adjoining images should match up, so a slight one pixel overlap should not be noticable. Looking at the first image a full scale view shows a very light diagonal join line. | I will experiment with some other x-geometry (-749 or -751 instead -750) | but why there are artifacts in the middle of p3m1_tile_flatten2.png | where the y-geometry is always 0 is unknown to me. xc: by default craetes a white background. On solution may be to use xc:none (transparent color) then use a +matte afetr the flatten to make all semi-transparent pixels fully opaque. that means partical overlaps will be handled, however if any pixel did not get any coverage then that pixel will become black (none = fully transparent black). I shrunk the canvas size slightly so that the images would overlap slightly so as to ensure no partical overlaping occurs. The result while not mathematically correct should not have any gross errors. It will also still tile fine, though produce a slightly smaller image. | The only reason I can think of is that one or more of the intermediate images | p3m1_G1.png, p3m1_G2.png, p3m1_G5.png and p3m1_G6.png are invalide. I couldn't see the image to comment! | In this example I used p3m1_G2.png generated by the larger rotated | image p3m1_G2b.png with the crop command | convert p3m1_G2b.png -gravity NorthEast -crop 1501x1300+0+0 p3m1_G2.png | If here the y-geometry is 1-2 pixel wrong this could explain the | horizontal artifacts. | It is more likely that a rotate of 60 degrees, expanded the image by one pixel too much, In that case your original mathematically derived offset will be a better idea. Also your equalateral triangle may not be exactly equlateral as you are using integers for your specification. IM does handle floating point, and it may be some adjustments is needed to get the edge pixels right. Perhaps a some experiments with a smaller solid color triangles of different colors, will be better to check on how well the images match up at the pixel level. | Apart from this geometry issue the problem with this one-line IM command | is that I don't know yet how to translate it in PerlMagick. | The literature I have (Lehmann, M.: Programmieren von Grafiken mit Perl. 2003) | has no examples for the use of -page and -flatten | (is -page a method or an attribute used by what method?) | The IM website gives a list of all the perlMagick option available. though how complete it is is another matter. | > This tile is then just mirror tiled... | > | > convert p3m1_tile_part.png \ | > \( +clone -flop \) +append \ | > \( +clone -flip \) -append p3m1_tile.png | | This is the generation sequence that is used in pmm and | p4m. p3m1 has a sequence that differs in one point: | there is flip in the two brackets. If flop and flip is | used the result (with the flatten version) is | The parenthesis start a new image sequence seperate to the original. A clone (or copy) is made and flopped or flipped, and the result then appeads to the original image sequence, for appending. The alturnative is to flip images to temporary files as you previouslay did See IM examples basics, parenthesis http://www.cit.gu.edu.au/~anthony/graphics/imagick6/basics/#image_seq | http://www.vi-anec.de/Trance-Art/IM-examples/IM-plane_group_p3m1/p3m1_tile_flatten1.png | (40 MB) | | In contrast the sequence | convert p3m1_tile_part.png \ | \( +clone -flip \) +append \ | \( +clone -flip \) -append p3m1_tile.png | | delivers the right tile (with the non flatten version) | http://www.vi-anec.de/Trance-Art/IM-examples/IM-plane_group_p3m1/p3m1_tile.png | (40 MB) | Not sure that the colors would line up with a vertical flip before a horizontal append!!! Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- Anyone who slaps a 'This page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee, 1996 ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
