简体   繁体   English

你如何处理/操纵分割图像

[英]How do you handle / manipulate split images

We have a requirement to display short / bigger size images. 我们要求显示短/大尺寸图像。 (eg I could have the front portion of the bus, back portion of the bus and middle portion of the bus as separate images). (例如,我可以将总线的前部,总线的后部和总线的中间部分作为单独的图像)。

So to demonstrate the above, I could try 所以为了证明上述情况,我可以试试

front,middle,middle,back (to construct shorter image)
front,middle,middle,middle,middle,back (to construct bigger image)

Are there any sites which let you download such images (ie they are already split) OR what would be an easier way to achieve this from an already available image. 是否有任何网站允许您下载此类图像(即它们已经拆分)或者从已经可用的图像中实现此目的的更简单方法。

You can use ImageMagick. 您可以使用ImageMagick。 Check the following example . 请检查以下示例

In your case if you want to split image only horizontally in (let's assume) 200px slices: 在您的情况下,如果您只想水平分割图像(让我们假设)200px切片:

convert -crop 200 +repage verybig.jpg slice%02d.jpg

You could slice and dice an existing image with HTML/CSS, by setting up several adjacent elements with the same image as a background, then manipulating the widths and background position to get the desired effect. 您可以使用HTML / CSS对现有图像进行切片和切块,方法是将多个相邻元素设置为与背景相同的图像,然后操纵宽度和背景位置以获得所需效果。

Here's an example: http://jsfiddle.net/gjJcM/ 这是一个例子: http//jsfiddle.net/gjJcM/

You'd need to know something about the image content you're working with to make this seamless - I'd need more context to think in further detail. 您需要了解与您合作的图像内容以使其无缝化 - 我需要更多背景来进一步思考。

HTH HTH

The slicing and dicing can also be done with the Gimp . 切片和切块也可以使用Gimp完成。

Check out the Gimp's Filters->Map->Make-Seamless. 查看Gimp的过滤器 - > Map-> Make-Seamless。 It's used to make tiles join up seamlessly both horizontally and vertically. 它用于使瓷砖水平和垂直无缝连接。 You can use it to make a horizontally repeatable tile by adding extra background above and below, and then after use cropping away the excess. 您可以通过在上方和下方添加额外的背景来使用它来制作水平可重复的图块,然后在使用之后裁剪掉多余的图块。

A more sophisticated tool for making the seamless join is panotools . 用于进行无缝连接的更复杂的工具是panotools

Combining the pieces at the end is easiest if you include half of the middle of the bus with the back and half of the middle with the front. 如果您将公交车中间的一半与后部和中间的一半包括在前面,那么最后将这些部件组合起来是最简单的。 You won't get a bus with no middle, but from the question, that's not something you needed. 你不会得到没有中间的公共汽车,但从问题来看,这不是你需要的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM