Greetings...

This may be a crazy question but is it possible to have PHP create a photoshop formatted file? The PS file created would contain layers and fonts... Maybe you all could direct me to someone who may know something about this..

Thanks,
Tony

    ok.... im only a newb to php, but i just dont see how this could be possible.

    think about it for a second.

      I know it can be done. It would have to be done by a Photoshop Developer who is an expert in the knowledge of photoshop file structure and at the same time knows PHP. The question would be, is it worth all the coding. I know folks at Adobe wouldn't want this created unless they had a piece of the action.

      Tony

        "The question would be, is it worth all the coding"

        what would be the use of it? a photoshop document is only really usefull to photoshop. and well, it allready has the ability to create new files.

        just dont see the point.

          The concept would be as follows. A visitor would visit a website and create a design with images and fonts that they would want professional printed. They would submit the design to the website owner. The website owner would receive the php created photoshop graphic that they would load into photoshop for further editing. Then they could professional print the visitors design with high dpi for the visitor. This would save steps for the website owner. The owner wouldn't have to redesign what the visitor wanted in photoshop.

          Tony

            Hm. I do know that the Gimp can write layered PSD files, and it has command-line and scripting interfaces so that other programs can use it. I've never used for such in such a way though - I suspect it would require quite a bit of effort (all of the actual composition would be written in Scheme for the Gimp to run, for example - all PHP would do would say "make me a PSD with this an' this an' this".).

              Hey Weedpacket,

              This GIMP sounds interesting. I'm guessing my server doesn't have it installed though. Is it a pretty much standard install that hosting companies usually install with php? My hosting company runs on a IIS system.. Will it show up in phpinfo() if it is installed?

              Tony

                Gimp isn't something a typical host will have installed (nor is it something they'll likely find useful to install). I'd HIGHLY recommend trying Gimp on your home machine to see if it'll even do what you want it to before checking with your host. Gimp does sound like it'll be the closest thing you'll get to generating PSDs. The only other thing I can think of is to have Photoshop installed on your host server and try doing something with COM.

                  just to clarify, GIMP is a stand-alone image editor - just like Photoshop. I isn't a webserver app. I think Weedpackets point was, if GIMP can create layered PSDs, why couldn't PHP? Why not, indeed. Although, wouldn't .eps files be more flexible? My undertanding is that .eps files are the industry standard in the print world. Course, I don't live/work in the print world, so maybe I'm wrong.

                    Weedpacket's suggestion of using gimp sounds like the only way to go. I can't imagine there would be any chance you could do this with straight php. You will most likely need to run your own server as it will be difficult to find a hosting company that has gimp installed. you may come across one and get lucky though.
                    in the end though, you will have to rasterize your text layers anyway as, you can't be sure everyone is going to have the same fonts.

                    maybe someone has figured out how to do layered tiffs in php?

                      Hey Chucklarge,

                      I found this hosting company called openhosting.com at: http://www.openhosting.com/packages. It seems they have GIMP mentioned but not sure if it is really there. I'm not a linux guy so I'm not sure of the lingo.. They have all there packages listed there. They seem a little high priced at around $26.95 a month but if the demand for my product increases then it would be well worth it.

                      Can GIMP have layers of text with the font specified? I would understand if the user must have the font installed, in which it is specified in the PSD file itself, just like photoshop. I wouldn't expect GIMP to imbed the ttf file itself in the PSD file, but at least be able to load the specified font from the user's font folder if that user has the font installed.

                      From what I read GIMP is pretty much a duplicate of Photoshop 3. Does this sound about right?

                      Tony

                        the font would need to be installed on the server.... not the client. and id'e be carefull if you want to let clients upload fonts to your server. there not all free you know. you might get into trouble with liscences.

                          Originally posted by Tonytt98
                          From what I read GIMP is pretty much a duplicate of Photoshop 3. Does this sound about right?

                          It's by no means a duplicate; they're two different image processing apps. The relevant difference in this case being that (as I mentioned) The Gimp has scripting facilities and the ability to be operated by other programs.

                          The best way to find out about it is to download a copy and have a play.

                            Hey Weedpacket,

                            Maybe what I ment is they produce the same output file equal to Photoshop 3. I understand what you mean by they are two different proccessing apps., and i agree with that. But is it safe to say that GIMP outputs a PSD file equal to photoshop 3? Maybe I've been wrong all along about this GIMP if it can't output a photoshop PSD file that can't be loaded straight into photoshop. Layers and all.

                            Tony

                              Tony,
                              I think you should download gimp and play around with it and see what it can do. It can create psd files, i am not sure what equivalent photoshop version the gimp psd would equal, but they open fine in ps cs. GIMP is available for all os platforms.
                              as for your text layers, yes, you can create any text and if the end file user has that font it will show up, otherwise photoshop will handle it in different ways. I think in cs, it will automatically rasterize the layer for you.
                              As for the hosting company, I would write them. I didn't see that the actual gimp was installed but different tools for gui tools, etc.
                              However, on the main page of that hosting company is this

                              "You can login as root, add or remove user accounts, compile and install any custom software, just like you would on a dedicated machine, only for a fraction of the price. "

                              Here is the link for gimp
                              http://www.gimp.org/

                                Originally posted by Tonytt98
                                Hey Weedpacket,

                                Maybe what I ment is they produce the same output file equal to Photoshop 3. I understand what you mean by they are two different proccessing apps., and i agree with that. But is it safe to say that GIMP outputs a PSD file equal to photoshop 3? Maybe I've been wrong all along about this GIMP if it can't output a photoshop PSD file that can't be loaded straight into photoshop. Layers and all.

                                Tony

                                I looked it up: the PSDs it writes are in Photoshop 4's format. So you've got layers, masks, extra channels, guides, but not text or effect layers (obviously, though, you can have these rasterised.)
                                In fact, it would probably be a good idea not to use text layers even if they were available, in case the Gimp and Photoshop use slightly different kerning/hinting algorithms.

                                  Hey Chucklarge,

                                  That's just what I needed to know. It sounds like the GIMP is what I would need in the future when I'm ready to improve my website. As for the OpenHosting.com company it seems that they could at least get me set up with GIMP for a price. It may be an extra monthly charge also. But if I have the clients it would problably be worth it.

                                  I would probably find me some scheme programmer to write what I need to work with the site.

                                  The site I'm working for the past few months is almost complete. To see how this GIMP could really help me out you all can check out www.iSignDisigner.com
                                  Any feedback would be appreciated. You all maybe have some pointers that I over looked.

                                  You guys have been a great help!!

                                  Thanks,
                                  Tony

                                    The way I would do this would be to create a file format for use on the website, and a system to convert that format to PSD for the printer. I've actually done this in PHPhoto .. if someone wrote a convertor to go from my format to PSD you'd be done.

                                    However, editting layered files online is really not ideal. I'm still trying to figure out an interface that not totally awful..

                                      dont forget..... fonts are usually copyright protected, and letting clients upload fonts for there own designs WILL get you hung.

                                        Hey Thorpe,

                                        I have fonts online that visitors can choose to design with. The fonts are not listed as downloadable and are used for designing online only. It is up to the printing company to provide the font that the visitor chose to create there design with. Most printing companies already have a large font collection and can pretty much get close to what font the visitor created there design with.
                                        Check out my font collection and see if things look Legal.

                                        Tony

                                          Write a Reply...