Guest User

Untitled

a guest
Aug 9th, 2016
517
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // At this point, I'd like to take a moment to speak to you about the Adobe PSD
  2. // format. PSD is not a good format. PSD is not even a bad format. Calling it
  3. // such would be an insult to other bad formats, such as PCX or JPEG. No, PSD
  4. // is an abysmal format. Having worked on this code for several weeks now, my
  5. // hate for PSD has grown to a raging fire that burns with the fierce passion
  6. // of a million suns.
  7. //
  8. // If there are two different ways of doing something, PSD will do both, in
  9. // different places. It will then make up three more ways no sane human would
  10. // think of, and do those too. PSD makes inconsistency an art form. Why, for
  11. // instance, did it suddenly decide that *these* particular chunks should be
  12. // aligned to four bytes, and that this alignement should *not* be included in
  13. // the size? Other chunks in other places are either unaligned, or aligned with
  14. // the alignment included in the size. Here, though, it is not included. Either
  15. // one of these three behaviours would be fine. A sane format would pick one.
  16. // PSD, of course, uses all three, and more.
  17. //
  18. // Trying to get data out of a PSD file is like trying to find something in the
  19. // attic of your eccentric old uncle who died in a freak freshwater shark
  20. // attack on his 58th birthday. That last detail may not be important for the
  21. // purposes of the simile, but at this point I am spending a lot of time
  22. // imagining amusing fates for the people responsible for this Rube Goldberg of
  23. // a file format.
  24. //
  25. // Earlier, I tried to get a hold of the latest specs for the PSD file format.
  26. // To do this, I had to apply to them for permission to apply to them to have
  27. // them consider sending me this sacred tome. This would have involved faxing
  28. // them a copy of some document or other, probably signed in blood. I can only
  29. // imagine that they make this process so difficult because they are intensely
  30. // ashamed of having created this abomination. I was naturally not gullible
  31. // enough to go through with this procedure, but if I had done so, I would have
  32. // printed out every single page of the spec, and set them all on fire. Were it
  33. // within my power, I would gather every single copy of those specs, and launch
  34. // them on a spaceship directly into the sun.
  35. //
  36. // PSD is not my favourite file format.
RAW Paste Data