Resize image by filling with source ?

  • Thread starter Thread starter pasc
  • Start date Start date
  • Views Views 2,517
  • Replies Replies 21
P

pasc

Guest
Well, despite this random threadtitle, my question is actually quite reasonable.

I want to resize this picture:
ect.gif


to look like this:
ect2.gif

Requirements:
------------------
- Be able to adjust the size of the new higher res picture (e.g. give a width x height count)
- Batch conversion potiential: convert multiple pictures in this fashion ( I have a few hundred to do).


I know it is possible to get this effect done using Adobe Photoshops "Pattern/Fill" function.
Paint.NET also has a similar function.

However I would need to do this in batch. Its a simple "fill new picture of size X*Y with the old one instead of plainly resizing it.

Thanks in advance for suggestions.

MODS: Feel free to move this in an appropriate forum, I couldn't find a better one - sorry.
 
I do not have a working suggestion at this moment but my "forest for the trees" line of thought says might it not be better to make a huge tile image (100000x200000 or whatever) and crop that into a new image however many times it needs doing?
 
it would be utterly annoying to do this for 500+ files...

Each file I want to resize has different content.
The one you are seeing up there is just a 001 from maaaany ones.

I understand however that my request is very specific and there may be no easy/batch approach to it.
 
Yeah I saw the different files requirement. I am now free to ponder some more stuff and this looks like it is going to take some http://www.imagemagick.org/script/montage.php and http://www.imagemagick.org/script/convert.php action rather than my usual go to options of gimp and irfanview.

I am still opting for the montage (tile is easy enough to pull off here) and crop down option rather than trying to create a tiled background layer and flattening it or something.

"montage.exe -geometry +0+0 filename.file filename.file filename.file filename.file filename.file filename.file output.file"
That should generate the tile effect and call it output.file (repeat filename.file however many times is necessary to create a proper tiled thing- 2x2 =4 ,3x3=9 .....).

Crop from here. You can go back to a proper crop but if you are going custom a batch file might work well.
"convert nicebigtiledfile.file -crop 640x480 outputfile.jpg"
Tweaks should be fairly obvious and it should spit out cropped files.

On a different note it looks like I am going to have to go back and learn imagemagick as I fear I am going to have a use for this as this year drags on.
 
Since I don't feel like opening a new thread I'm gonna ask here.

This is a similar problem than before with just a little twist added:

I would like to do the following using image magick:

1. set a specific canvas size, say 1056x576 for example
2. Take one image, this one for example.
3. Have image magick stitch this image multiple times over said canvas so it will look like this.
 
Assuming the image is built to be tiled I do not see the twist/how it is different (or at least how the solution above falls short) as you can tile it again and crop it like before.
 
as you can see in the image the result has the images overlapping on several parts...

I'd like to do it without cropping. Having ImageMagick automatically stitch the images together.
 
Having ImageMagick automatically stitch the images together.

Not sure if this is even possible..

If you're willing to crop (well, the next time):

Took this as a source, modifying yours
bvgQSbG.gif


The following script:

Code:
infile="castillo.gif"
 
h2=`convert $infile -format "%[fx:round(h/2)]" info:`
 
convert $infile \( -clone 0 -roll +0+$h2 \) +append -write mpr:sometile +delete -size 1056x576 tile:mpr:sometile output.png

This is the result: LINK FOR SANITY.
 
Ah yes I see that now.... unless you have numbers you can feed it to align the tiles (in which case I imagine you would have just cropped the images and gone normally) I am not sure where to look. I do not doubt there is automated software out there* that can try to do it for you but it is not something I have really had to consider- if it is one or two images I will crop them myself, if I am making the image/having it made I would make sure to have it done it properly and if I was given a large batch of them I would say no thanks.

*you might do better to find some of the stuff you can manually guide into position as visual pattern recognition is not a computer strongpoint.
 
well... FAST6191 I don't know if it is the same, however the one map stitching software I recently tried worked perfect with a moving video, however the task I desire is probably too complicated (and takes WAY to long to do by hand).

I was so sure it should be possilbe to align images along a given canas just by matching fitting points in each image...
 
I'm willing to fiddle around with this concept.. I think it's pretty interesting actually.

Gimme a few days..
 
well... FAST6191 I don't know if it is the same, however the one map stitching software I recently tried worked perfect with a moving video, however the task I desire is probably too complicated (and takes WAY to long to do by hand).

I was so sure it should be possilbe to align images along a given canas just by matching fitting points in each image...

You have video software that can do that*? If you really want it is not hard to present a video program with a static image or three all while thinking it is a video and have it do it if you prefer; basic tools like avisynth will do that. I can see it working slightly better though as modern video encoding is all about the motion displacement and high end masking filters are great fans of reference points.

*is it for dual camera 3d by any chance?

"just by matching fitting points" [by hand?]
Functionally that is no different to providing the cropping information or otherwise overlapping it properly. This is what Plainscript appears to have attempted to do for you (using a far nicer functional/using variables approach than my "copy and paste enough times to wing it" approach from earlier).
If they are all kind of like of that (simple emblems on a static or different enough background*) then you might be able to build it back up but say cropping to the edge of the emblem (automated cropping is far more feasible), figuring out how much space you need between the emblems, what the background should be and then building that up. On your image though I do not know if the "stained glass" effect is a GIF lossy image error or something you are actually seeking.

*we are heading into actual fun territory now but you could probably cook up a method to mask the emblem thing out similar to how you might make a layer mask using brightness/contrast techniques.

Beyond that I got curious though so I went looking, sadly the terms as they apply to graphics focus more on 3d these days (the act of putting shapes together is known as tessellation - adaptive, automated, texture being what I thought would be good ideas to stick on them) though that has given me some interesting reading material (it seems I need to read up on Displacement Mapping) or proper old school maths/computer science (see Wang tiles). I am quite prepared to have been using the wrong search terms though (undercropped did not get me anywhere).
 
Here is something I just threw together.

http://www.mediafire.com/?e35yz78wpozr3sg

Seriously. gotta love this place here :)

However it seems that the approach you used is simlar to the one I asked for at the ImageMagick Forums:

http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=22860&start=15
That script there has the same problem as yours has.
It is unable to puzzle toghether specific images. (See the link I posted)

BTW: I also asked that at the other forum: How is it possible to repeat a batch script over all files in a folder and have the output named 001, 002 ... ?
Can't seem to find a satisfying answer...

Things start to get interesting, we are getting somewhere :)

FAST6191: I'm not sure what you meant by dual camera... the Software I have is capable of taking a video you made (be it a side-by-side moving or random direction moving video) and stitch together any map that is seen on the video itself.
 
hmm i think i understand what you want. but it might be impossible. I think your asking that you don't just want images tiled, but you want the images reconfigure so that the tiled image has a seamless connection with all 4 sides.
 
hmm i think i understand what you want. but it might be impossible. I think your asking that you don't just want images tiled, but you want the images reconfigure so that the tiled image has a seamless connection with all 4 sides.

Ok KazoWAR :)

I think I found the perfect solution to make your tool PERFECT !

Do you think it would be possible to add the following to your tool ?:

An option that allows the user to enter a width and height size.
This size shall than be the value that the images will be cropped before your tool processes them.

Thanks in advance.

I'm sure after this is added this tool will work with every single picture that sports recurring patterns.
The only thing one has to do then is to find the crop area.
 

Site & Scene News

Popular threads in this forum