简体   繁体   English

从现有图像生成图像?

[英]Generating an image from pre-existing ones?

This is kinda confusing, so forgive me if you don't understand what I am asking. 这有点令人困惑,如果您不明白我的要求,请原谅我。 I'm trying to develop my skills and I wanted to move onto images as a next step. 我正在尝试发展自己的技能,下一步我想转移到图像上。 I did a bit of searching and I thought a good way to try this would maybe be to generate military ribbon racks depending on the options the user selects. 我做了一些搜索,我认为尝试此操作的好方法可能是根据用户选择的选项生成军用色带架。

(See something like this as an example: http://www.ribbon-rack-builder.com/ribbons/build/4 ) (请参见以下示例: http : //www.ribbon-rack-builder.com/ribbons/build/4

Now, from looking at the source code I can see that the creator of that website creates a form with all of the different ribbons and allows the user to select the ones they want with checkboxes. 现在,通过查看源代码,我可以看到该网站的创建者使用所有不同的功能区创建了一个表单,并允许用户使用复选框选择他们想要的功能区。 This form is then posted to some PHP on the page somewhere. 然后将此表单发布到页面上某处的某些PHP。

Being new to the image concept I have no idea what kind of PHP this would be. 作为图像概念的新手,我不知道这将是哪种PHP。 Could anyone give me an idea of how this website could do this and where I should start should I want to create something similar? 谁能给我一个关于这个网站如何做到的想法,我应该从哪里开始呢?

Thanks very much! 非常感谢!

First, you'll need to get which checkboxes were checked : 首先,您需要获取选中了哪些复选框

Set the name in the form to check_list[] and you will be able to access all the checkboxes as an array($_POST['check_list'][]) 将表单中的名称设置为check_list [],您将能够以数组的形式访问所有复选框($ _POST ['check_list'] [])

Second, you'll most likely want to use the GD and Image Functions built into PHP. 其次,您很可能想使用PHP内置的GD和Image函数

There is a lot there, and it can be confusing, so I suggest you do some reading through questions on SO on the subject: https://stackoverflow.com/search?q=merge+image+[php] 那里有很多东西,而且可能会令人困惑,所以我建议您通读一些有关SO的问题: https : //stackoverflow.com/search?q=merge+image+[php]

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

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