For software development one often needs images. But when I start working on an image I very fast end up with dozens of versions, like so
Start with a nice large scale image, let's say a photo from my camera(x.nef)
I do some adjustments on exposure correction and white balance, convert it to a x.jpg
start to add some little stuff by copying in various pieces from two other images. (a.jpg, b.jpg resulting in a layered image x.pdn
now I scale it to the required size and save it as x_small.jpg
By now I have 6 different image files floating around, and nobody but me knows the process behind them.
So the question is: How do you handle images in the development process?
Edit:
Thx for all the great input. I combined various questions to my own personal best answer. But I accepted jiinx0r's answer because it really contained the missing idea for me to apply a naming convention for the kind of changes done.
You could just put your images under source control.
That would handle the revision history and notes. If you really need to keep all the transitional versions of the image around and don't want that in your project folder, most source control trees have a 'tools' area for that type of thing.
EDIT:
If what you're after is keeping track of the various sizes (thumbnails, etc), I would go with convention over configuration and implement a uniform file (or directory) naming system.
For instance, I would probably have seperate folders for the 100px and 500px versions of the same image. Or maybe I would put them in the same folder with a special naming convention: logo-100.jpg, and logo-500.jpg ...Either way is probably fine, just make a decision and be sure to stay consistent throughout the project.
One last thought: some folks like to include a ton of metadata in the file name. To me it depends on the scope of your operation and your individual needs. I would personally default to a less is more approach -- if you're thinking about investing in maintaining something like that (or creating a tool to do it for you), make sure it's actually a net gain of time and not just something for your OCD to filddle with!
As developers, we do tend to make glaring mistakes in this area. I know I've been guilty a bunch of times.
file naming should be handled via a naming convention.
{name}-{mod type}-{size}-{version}-{create date}.png
{name}-final.png
e.g.
file-white_balance-800x600-v01-20090831.png
file-white_balance-800x600-v02-20090831.png
file-final.jpg
the real point is to create an agreed on convention that people see the value in following
(however simple/complex is necessary for your group). In my organization we do this for input/output datafiles, images, scripts, etc. (not the same convention necessarily for all, but that they follow something that was agree upon)
Hope that helps.
I try hard to have only a single "source" image and then pour all the changes into a short Python script or some other piece of code so that I can recreate the effects and/or adjust them any time later.
The original image is saved either as PNG or TIFF (to avoid quality loss due by saving) and converted into the final type as the very last step. That's also the time when I do the scaling and other lossy operations.
We developed a downloadable and a web game with a few hundred graphic assets, most of which were stored as psd files during development. We needed jpg and and png versions for the release version of the game and lower quality jpg and png versions for the web version.
We checked the originals into source control to handle versioning.
In order to remain flexible and able to alter the original without having to re-pack the image twice after each update, we had a Perl / ImageMagick script that would update the packed images automatically.
The file name remained the same, but the compressed images would go to different directories, depending which version of the game each image was packed for.
We typically have the image title and resolution appended together in the name.
myimage_800_600.png
this way all of the like images are grouped together in the folder view and you can easily select the size you want without having to wander what "medium" means.
I agree in that source control might be your best bet for this. However conventional source control doesn't really fit images.
Have you looked at http://www.alienbrain.com ?
It's commercial but may be something that could help. I was also looking and saw something about Photoshop or Imageready having version control in it too. You could look into that.
I put all the bits and pieces together from the various answers, for a system that fits my needs:
Images go into source control. This includes images of or intermediate steps.
If multiple images are needed based on one source image, but with different transformations, this can be integrated into automatic builds (scaling, compressing, tinting)
Based on a naming convention or folder structure files can get categorized into: source (e.g. original photo), intermediate (for the various processing steps), base (an image that is actually used in the software or possible after automatic processing as in step 2)
For the processing steps, a naming convention should ensure that the kind of processing can be recognised, and also the order of steps. So one would be able to move from the source image through the various processing steps to the final image.
Related
I am searching for a performant way to generate a PNG based on a layout. These layouts will mostly consist of text and a 1-2 icons. The Datasource for these informations is JSON. However, the JSON won't be normalized to fit the Layout/Screen size. Let me clarify: The JSON will contain an attribute "Title". The title may be too long, so the font size has to be decreased. Or the description has too many attributes and only some of them need to be displayed, and so on.
We currently have a system in place for creating these layouts and generating a PNG, but creating new layouts is very time consuming and frankly speaking, a pain. However, the current solution is extremely performant, as it can generate a PNG in around 1-2ms. For my PoC to be deemed successful, i need to reach 10ms or lower. If there is a solution that takes slightly longer to generate, but can be scaled horizontally, that's fine as well.
TL;DR:
I'm searching for a way to generate a PNG based on a layout i create. The PNG generation needs to be performant (< 10ms) and the implementation of new layouts should be as hassle free as possible.
What technologies are suited for this use case?
Here is an example, of what a layout might look like:
Edit: I can't post images yet, but please search for "electronic shelf labeling" on google images.
Also:
I've already made a similar question yesterday, but it was pointed out that my way of trying to achieve this, probably won't lead to success. Original Post
I am sure it is very simple ... I just cannot get my head around this...
the exist-db Documentation is a bit fuzzy on content extraction...
http://exist-db.org/exist/apps/doc/contentextraction.
I have a pdf-file, containing of about 162 high-res images (the pdf is quite big ...) and I do not know how to access any of the that are presumably created ...
please do not destroy me! I am just starting to build a database (for an Edition at Uni)I'd love to have a facsimile edition (so one Tab with the image-file and one tab with the transcribed texts)
I aim at doing something similar to what Heidelberg Universitdy did with the "Welsche Gast Digital" http://digi.ub.uni-heidelberg.de/diglit/cpg389/0190/image
(the choosen image is just an example! )
This pic
When clicking on faksimile the Scan opens and when clicking on Transkription the transcribed texts open!
I am quite new to Xquery, Xpath and most X-related stuff. I have a "working design" put together in exist-db and am looking at TEI for marking up the transcritpion etc, I fear I'll have to spend quite some time on this issue ...
(it is not about doing my job for me, it's just about pointing me in the right direction)
I m afraid the short answer is simply don't.
Storing a pdf in your db, and then trying to extract images from it, is kind of a recipe for disaster. Instead you should use the source images (not necessarily extracted from the pdf), and store these individually in a collection (e.g. resources/img). Those image files are then the binary resources that the documentation is actually talking about.
You might want to take a look at tei-publisher for creating digital edition in exist, especially this demo app for how to present high-res facsimiles with transcribed portions of text. I m afraid its all a bit more involved then just opening a pdf in a browser, but so is the Welsche Gast Digital
The VS2010 image library contains several pngs of standard icons (Warning, Error, ...) in different sizes side by side. What is the use of such a png?
Is it meant as source to cut the best size and save it as new png?
Or is there a way to use such a png and the best resolution is picked automatically. And if so, how is this done?
I wonder why there are such side-by-side images and not several files such as Warning32.png, Warning16.png ....
Example: Information.png
It is an old programming trick and it is exactly what you assume it to be. The bitmap is a "film roll" and to make it work you have to know the pitch of the images, the resource doesn't tell you. Hard-coded in the source code. Microsoft's source code, you got the copy of their work.
This may well be a little of an open-ended question
The site I am working on requires to be optimised for performance. One of the key areas is to optimise the file sizes of the images used upon the site.
Unfortunatley these images are being created by employees who do not have the required knowledge for creating images for the web, and it is my job to produce a set of guidelines for them to use.
I was wondering whether there was any resource/guidlines/literature regarding typical images file sizes for images of different dimensions - as I would like to include something like this to aid them to ensure their images are being created properly.
Any info would be greatly appreciated.
Thanks in advance
I can't answer the opinion question, but I can suggest some guidelines that will keep your images smaller.
First off, if they're using Photoshop to edit their images, it's likely they're storing a whole bunch of crap in the headers (digital papertrail, EXIF data, and such). Also, folks will frequently save in too high a bit depth.
For novice users, trying to explain why they need to use "save for web" is more likely to confuse them. Instead, just point them at:
http://www.smushit.com/ysmush.it/
This site is rather handy - it will compress all the images on a page you specify, or you can upload the images.
You should strongly consider writing some guidelines about where images are stored as well. It's frequently very beneficial to have your static image content stored on several servers, apart from your dynamic content. Most browsers will only download a limited # of files at a time from any given website (usually it's 2).
Unless there's a good reason, all your images should be cached using one of the HTTP cache techniques (expires, etags, etc).
Good luck.
72 dpi as a resolution and either jpeg or png formats work best.
Try to use images at the exact pixel area size they will end up being displayed as. This is specified by the images height and width attributes.
You can set the output quality of a jpeg image which will also save file size although there is a trade off against image quality.
I hope this is of use.
I've been admiring StackOverflow's default quilt-like profile pictures (which I notice are also on the Fail Blog) and am curious what program both are using to generate them.
But what I really want to know is: If you were to design the system to create default profile pictures, how would you do it?
I'm looking for ideas on what algorithm you'd use, as well as things like how you would related the image to the user, be it related to their username, or some portrayal of their progress (ie the image gets more complex, or larger, as they gain reputation).
FWIW, the default pictures are generated by gravatar, which is why you'll see them on more than this site.
It's called an Identicon. On Stackoverflow it Gravatar uses your IP address to generate the image.
This is an editorial, not necessarily an answer.
Those auto-generated avatars on this site come from a service (Gravatar) that focuses exclusively on providing avatars and is therefore the core of their business. For apps that aren't specifically intended to generate and display avatars, I would just go with an empty placeholder (like Facebook). It's a neat feature, but is it worth your development time when a simple placeholder would be just as effective?
A very good source of images would be flame fractals. They are rather computationally expensive, so simply sourcing them from a project like electric sheep or having them be rendered by the user's computer should be considered to offload the work.
Who wouldn't want default profile pictures like these?
alt text http://sheepserver.net/v2d6/gen/202/124809/icon.jpg alt text http://sheepserver.net/v2d6/gen/202/124805/icon.jpg alt text http://sheepserver.net/v2d6/gen/202/125373/i77.jpg alt text http://sheepserver.net/v2d6/gen/202/125431/i116.jpg
Use a Julia set or something like that and set the initial conditions to a hash of the user's email address.
I'd use a jpeg server tool (aspjpg or similar) to manipulate the image on load so it displays their badges within their profile pic.
In fact, using any tool to dynamically generate images is pretty cool. Applying some sort of 3d or flash technology to dynamically create images using random variables for eye spacing or facial structure would be pretty wicked as well.
But ya this is a weird question. hah!
I did something similar years back, I used POV-Ray to generate little 3D scenes with torusses (torii ?) and spheres. There were lots of parameters to tweak such as the position, size and colour of each object.
POV-Ray is a scriptable 3D render engine, you can find it here.
Unfortunately my images all looked too similar to each other. I love Gravatar's identicons as uses on this site. I think the symmetry helps and the shapes are unique enough that you can identify users fairly clearly.
In ruby there have a library http://github.com/swdyh/quilt to generate it!