Solved

Software to generate custom JPGs

Posted on 2016-10-27
12
55 Views
Last Modified: 2016-11-04
Does anyone know of software that will generate a JPG with specific information?  Suppose, for example, that you're selling authentic Victorian dolls and with each one you'd like to include a JPG that serves as a certificate of authentication, with an official looking gold seal,  that said something like,

"This guarantees that this doll, serial number 12345754, is an authentic Victorian doll."

Here's an example:.
Barcode certificate
When you buy a barcode from these people they send a jpg, above, in addition to your barcodes. It appears that they've created a template with their company artwork and have a way then of plugging in the buyer's information and the barcode numbers purchased (123456123006 - 123456123994).

Thanks for any information.
0
Comment
Question by:steva
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 34

Assisted Solution

by:Dan Craciun
Dan Craciun earned 125 total points
ID: 41864873
My guess is there are multiple moving parts here:
- a template with the background and the static content
- a barcode generator that outputs PNGs or some form of vector content (eps, ai, cdr, etc)
- PNGs for every digit (0-9)
- a graphic library like ImageMagick, that allows to combine the elements above
- a script that does the assembly

HTH,
Dan
1
 
LVL 38

Expert Comment

by:BillDL
ID: 41864950
I know nothing about bar codes, but I do agree with Dan's suggestion of using Imagemagick to combine different template elements into one printable image.  There is a learning curve with ImageMagick though:
http://www.imagemagick.org/script/index.php
http://www.imagemagick.org/script/binary-releases.php

Basically it comprises about a dozen EXE files in its program folder.  Your command has to include the named EXE, specific operators, and the switches and parameters that relate to the EXE and each of the operators.  In your case you would probably only be calling a couple of the program EXEs at most, but you nevertheless still have to learn the options and switches.
http://www.imagemagick.org/script/command-line-processing.php
http://www.imagemagick.org/script/command-line-processing.php#option

The good news is that there are loads of resources;
http://www.imagemagick.org/Usage/
http://www.imagemagick.org/discourse-server/
and loads of forums with usage examples.

I have a feeling that a fellow expert Joe Winograd will be along shortly and might suggest a similar alternative to ImageMagick that he prefers.   He is very expert in this type of thing.
1
 

Author Comment

by:steva
ID: 41865526
Thanks guys.  I appreciate the input!  Hopefully Joe will jump in with some interesting ideas.
0
 
LVL 38

Assisted Solution

by:BillDL
BillDL earned 175 total points
ID: 41865632
Just one question in the meantime.  How many Victorian dolls are you likely to be selling a week?  I am just wondering whether this is something that really needs to be scripted.  For example, if the number of dolls is fairly low is this something that could be done manually using a template in a desktop publising application, or would the volume be high enough to warrant a scripted solution that either uses an input form for the details or fetches them from a database like a MS Office Mail Merge process?

I found some old Experts-Exchange certificates dating back to around 2007.  They used to have very ornate edges like real certificates and you could generate them on demand and save them out as (from memory) PDF files.  I believe that the process used ASP scripting to overlay text on a background image.  I have included a modified HTML file and the original background GIF to serve as an example.  The HTML file is hard-coded with the details to overlay, and the layout uses internal styling, but ASP or PHP scripting would be able to fetch in details from an external source and present a dynamically populated printable page.  It is just an example, and if you had your own background image and knowledge of web programming, you could create what you need.

Place these two files in the same folder and open the HTML file in your browser.
certificate.html
certificate.gif
A screenshot of the populated certificate:

populated_certificate.jpg
The ornate scrolling looks like intestines in fishnet stockings, and I would hate to see what people would see if the corner scrolls were added to a "Rorschach" (inkblot) test ;-)  It always reminds me of the Spirograph set I used to love using as a kid.
1
 
LVL 38

Expert Comment

by:BillDL
ID: 41865665
You could very easily knock up a template in Microsoft Publisher and, by only filling in two fields for each doll, generate and print a "Victorian looking" certificate.  I only have a very old version of Publisher, but here's what I put together quickly using all internal design themes and one external image (namely the wax seal from http://www.123rf.com/photo_6872834_wax-seal-collection.html).  You would obviously need your own company logo.  The fields I have highlighted in blue are the only ones you would need to fill in.  There are plenty of certificate templates around the Internet - some free and some that need licensed.

Publisher_COA.jpg
1
 

Author Comment

by:steva
ID: 41866024
The volume is too much to do by hand.  (I only used Victorian dolls as an example.) It has to be  software than can pull the user's info in from the order object.  

One thought I had is to have the "template" be a php file that creates the HTML that implements the graphics and pulls the user info in from the order object to fill in the specific fields. I would then send the url along with the product and the buyer could open the url in a browser and  do a screen capture if they wanted an image.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 51

Accepted Solution

by:
Joe Winograd, EE MVE earned 200 total points
ID: 41866470
First, my thanks to Bill for the heads-up on this question — much appreciated!

Two questions for steva:

(1) You said that the user's info for the certificate is coming from "the order object". What exactly do you mean by "order object" and where is it stored?

(2) You said that you would send the URL along with the product. Why not send the certificate with the product? Or is the product a digital download rather than a physical item? I had been thinking Victorian dolls, but then you said that you used Victorian dolls only as an example, so I'm confused on what the product really is and how its shipment is related to the shipment of the certificate.

In any event, I think that Bill's comment about saving them as PDF files may be the way to go — perhaps something simple like filling a PDF form. Since the volume is high, you may want a command line method, such as populating an FDF file with the info and then using the fill_form operation in PDFtk Server. Of course, if you really prefer a different file type, such as JPG or PNG, it's easy to create that from the PDF file.

Btw, when Bill said that I might suggest a similar alternative to ImageMagick that I prefer, he was talking about GraphicsMagick, which is a fork of ImageMagick. While it's true that I prefer GM, there are times when I use IM (their capabilities are very similar). If you're interested in GM, you may find these EE articles helpful:

Reduce the file size of many JPG files in many folders via an automated, mass, batch compression method

Create a PDF file with Contact Sheets (montage of thumbnails) for all JPG files in a folder and each of its subfolders using an automated, batch method

Create an image (BMP, GIF, JPG, PNG, TIF, etc.) from a multi-page PDF

Convert a multi-page PDF file into multiple image files

Regards, Joe
0
 

Author Closing Comment

by:steva
ID: 41867116
Thanks to everyone!
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41867208
You're welcome. Good luck with the project. I hope you sell lots of products!
0
 

Author Comment

by:steva
ID: 41867832
Whoops!  I wrote a response answering your questions, Joe, but when I split the points and entered  a "final message" text, that replaced the message I had written.

So . . . This is a digital product, so I'm looking for something I can include in the digital download.  The "Order Object" is generated by WooCommerce.  It collects the user info, card info, product info, price, etc. and stores it all in an "Order Object" that resides in the WooCommerce database within WordPress.  But I can access it so I can pull what I need to include n the certificate.

Thanks for all the links to the great graphics tools.  I'm certain I can do what I want from all  this.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 41868136
Thank you steva
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41874514
> Whoops! I wrote a response answering your questions, Joe, but when I split the points and entered a "final message" text, that replaced the message I had written.

Sadly, an all-too-common occurrence. It's one of many reasons that I never write posts online. I write them all offline in my fav text editor (with macros for the BBCode tags) and then copy/paste into the online page.

Anyway, thanks for the explanation of what you're doing — very interesting! Good luck with the project. Here comes this message to you via copy/paste. :)  Regards, Joe
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If your app took Google’s lash recently, here are the 5 most likely reasons.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now