I found a guide on how to apply a texture to an image using a smart object, and I was immediately puzzled by the question, how to get a texture from an image in the same way? However, in the end, I don't want to straighten the edges of the image, but I want to get a square texture from this image.

enter image description here enter image description here

  • If you have a smart object, the undistorted graphic will be inside the smart object. Double click on the smart object layer to open it.
    – Billy Kerr
    Sep 7, 2023 at 9:42
  • I know I don't need this. I need to extract the texture itself from a regular image as I showed in the pictures, initially there will be no smart-objects, and I want to know how to do it.
    – ud1e
    Sep 7, 2023 at 9:46
  • Then you'd need to use a Warp transfrom to try to remove the distortion it, but it'll be tricky. There's no magic functionality that will do it automatically.
    – Billy Kerr
    Sep 7, 2023 at 9:52
  • Understood, sorry, I thought it could be done automatically. But, in fact, why the program cannot do this, if I deform the grid of the smart object as needed, maybe there is still a way? Nothing will be done automatically, clearly, but at the same time, I can draw a form of distortion, and maybe with the help of it it can be done somehow?
    – ud1e
    Sep 7, 2023 at 9:56
  • 1
    I don't think there's an implementation of this in 2d software. Here's an example of what you're asking using 3d: graphicdesign.stackexchange.com/questions/133083/… Sep 7, 2023 at 12:16

1 Answer 1


The decylinderization problem seems to have been up a few times. One example:

How to convert a cylindrical pattern into a plane?

The solution uses Blender (an advanced 3D program). There one assumes the image in the image is wrapped around a cylinder, he guesses where the camera might have been and lets Blender make the inverse transform. The writer obviously knows the subject well.

Here's another: How does one decylinderize an image?

The writer presents the needed transform as math formulas and shows also something which tells (for those who understand analytic geometry) why the formulas should work. His rendered example shows what's already said in comments above: The unwrapped image will be blurry because there isn't enough information available. The blurriness is awful at the edges when compared to the apparent sharpness of the original image.

Otherwise the result looks right. The writer executes his formulas in Krita, but the same free filter add-on (G'MIC) is available also for Photoshop.

But your photo of the bottle has more problems:

  1. The view is tilted. Someone who can write math formulas may tell how much your photo must be warped and stretched vertically to compensate. The round top which is now elliptic should give the needed angle information, but the warping is practically impossible without math. The given answer cannot handle this case, it works only with straight horizontal wiews.
  2. The image seems to have a slight perspective. Photoshop's perspective adjustment can be used to compensate it
  3. The image has light variations. They can be removed only by making local adjustments based on experience.
  4. It's useless to test any decylinderization methods to your image because it's not really cylindrical. It's only warped to the right outline, but there's not at all the same horizontal squeezing at the vertical edges as the real wrapping on a 3D cylinder would cause.

Summary: The task is very complex. Theoretically you can get acceptable results if the photo has very high resolution, it's been shot in uniform light (no shadows, no highlights) and you can scrap the edges. The method to use is the Blender version. The 2nd version works with straight perpendicular wiews towards the cylinder axis.

  • Thank you, now I can at least imagine how this can be implemented, it made my soul feel better at least)))
    – ud1e
    Sep 8, 2023 at 7:06
  • @ud1e Actually it's possible to reverse quite easily the transformation (except light variations and the hidden area) you have made to warp the texture photo on the cylinder in your bottle image. The reversing is possible from your flattened result. The transformation you used is substantially simpler than what happens in wrapping a rectangular image on a 3D cylinder. Do you want to reverse a real wrap on a 3D cylinder or only the same fake warping you used? If the latter is the interesting one I will convert my answer for it.
    – Brad Wurst
    Sep 8, 2023 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.