POV-Ray : Newsgroups : povray.general : combining partial images Server Time
26 Jun 2024 02:51:16 EDT (-0400)
  combining partial images (Message 19 to 28 of 38)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Nicolas George
Subject: Re: combining partial images
Date: 9 Jul 2008 05:53:03
Message: <48748a7f$1@news.povray.org>
"stevenvh"  wrote in message
<web.487485687ec83d1bc0721a1d0@news.povray.org>:
> Can you explain to me quickly how I could script this combining job? No
> "RTFM", please. :-)

With Gimp, I could not explain: I experimented with its scripting facilities
a very long time ago, I just remember that it was quite agreeable to work
with.

I posted half an hour ago a message showing how to do the trick with Perl
and GdkPixbuf. Hope this helps.


Post a reply to this message

From: SharkD
Subject: Re: combining partial images
Date: 9 Jul 2008 06:10:00
Message: <web.48748d777ec83d1be2244ea70@news.povray.org>
"stevenvh" <nomail@nomail> wrote:
> I see GIMP allows you to select areas numerically. Great. So now I can select
> the partial image, and paste it in Photoshop. I still want to do this in
> Photoshop because of its magnetic placement feature. I don't know if GIMP has
> this too.

Try opening your images in XnView. It allows you to do batch operations such as
cropping and compositing into a single, larger image (called a "Contact Sheet"
in XnView).

Alternately, try ImageMagick. It's a command-line tool that, though more
powerful, takes a while to learn the ropes on.

-Mike


Post a reply to this message

From: Nicolas George
Subject: Re: combining partial images
Date: 9 Jul 2008 12:12:42
Message: <4874e37a@news.povray.org>
"SharkD"  wrote in message
<web.48748d777ec83d1be2244ea70@news.povray.org>:
> Alternately, try ImageMagick. It's a command-line tool that, though more
> powerful, takes a while to learn the ropes on.

Unfortunately, ImageMagick chokes on truncated files.


Post a reply to this message

From: Robert McGregor
Subject: Re: combining partial images
Date: 9 Jul 2008 15:25:00
Message: <web.48750da57ec83d1b86ff1d480@news.povray.org>
"stevenvh" <nomail@nomail> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> > stevenvh <nomail@nomail> wrote:
> > > I made a set of partial images using Start_Column, End_Column, Start_Row and
> > > End_Row.
> > > Now I want to combine them, but Photoshop can't read the images. Are the files
> > > not standard bitmap files (PNG in my case)?
> > > Any tools around to do this?
> >
> >   Try with the Gimp. IIRC, it ignores the errors and reads the images.
> > You can then re-save them.
> >
> > --
> >                                                           - Warp
>
> Hi Warp,
> thanks for the suggestion. Installed GIMP and it does read the files alright.
> However. In the POV-Ray render window the non-rendered area is checkered, so I
> presumed it would be transparent. My Photoshop-idea was to load all the files
> as individual layers, and then simply flatten the image.
> GIMP shows the non-rendered area as black, so the simple trick won't do.

Steven, you can use GIMP to do what you proposed doing with PhotoShop, scripted
or manually. Here's the manual method:

1. Open the first partial image in GIMP.
2. Use the Dialogs > Layers menu (F7 on Windows) to pull up a list of layers
3. Open the second partial image in GIMP and copy it.
4. Paste this partial image onto the first partial image
   (this makes a separate layer for the pasted image).
5. User menu Layer > New Layer (Shift+Ctrl+N)
6. In the Layers dialog set the pasted layer to mode: Screen.
7. Repeat 3-6 for each partial image.

This will ignore the black areas and make all the layers visible as a single
image at each step.

You can do the same thing in PhotoShop - experiment with the different layer
merge modes (Multiply, Lighten, etc.).

Hope this helps.

-Rob

"There is no spoon..."


Post a reply to this message

From: SharkD
Subject: Re: combining partial images
Date: 9 Jul 2008 19:10:01
Message: <web.487544c47ec83d1b3de647460@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> Steven, you can use GIMP to do what you proposed doing with PhotoShop, scripted
> or manually. Here's the manual method:
>
> 1. Open the first partial image in GIMP.
> 2. Use the Dialogs > Layers menu (F7 on Windows) to pull up a list of layers
> 3. Open the second partial image in GIMP and copy it.
> 4. Paste this partial image onto the first partial image
>    (this makes a separate layer for the pasted image).
> 5. User menu Layer > New Layer (Shift+Ctrl+N)
> 6. In the Layers dialog set the pasted layer to mode: Screen.
> 7. Repeat 3-6 for each partial image.
>
> This will ignore the black areas and make all the layers visible as a single
> image at each step.
>
> You can do the same thing in PhotoShop - experiment with the different layer
> merge modes (Multiply, Lighten, etc.).
>
> Hope this helps.
>
> -Rob
>
> "There is no spoon..."

I would just like to add that if you do manage to create a script to do so,
please upload it to the wiki.

If not, posting this tutorial there would be a big help.

-Mike


Post a reply to this message

From: stevenvh
Subject: Re: combining partial images
Date: 10 Jul 2008 00:15:00
Message: <web.48758bb17ec83d1bc0721a1d0@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:

> Steven, you can use GIMP to do what you proposed doing with PhotoShop, scripted
> or manually. Here's the manual method:
>
> 1. Open the first partial image in GIMP.
> 2. Use the Dialogs > Layers menu (F7 on Windows) to pull up a list of layers
> 3. Open the second partial image in GIMP and copy it.
> 4. Paste this partial image onto the first partial image
>    (this makes a separate layer for the pasted image).
> 5. User menu Layer > New Layer (Shift+Ctrl+N)
> 6. In the Layers dialog set the pasted layer to mode: Screen.
> 7. Repeat 3-6 for each partial image.
>
> This will ignore the black areas and make all the layers visible as a single
> image at each step.
>
> You can do the same thing in PhotoShop - experiment with the different layer
> merge modes (Multiply, Lighten, etc.).
>

Thanks Rob, that's indeed what I would do in Photoshop if only it would open the
files :-)
Actually, F7 is the Photoshop way to bring up the Layers menu, in GIMP it seems
to be Ctrl-L. Screening is also what you do in PS. And in your manual method
step 5 isn't necessary.

The thing is, this is a HUGE image (400 megapixels) and placing layer upon layer
asks a lot of computer resources, unless you flatten layers after every step 6.
Still takes a lot of time though.
And I guess I made a wrong choice about the size of the partial images; there's
too many of them to do the operation by hand.

Thanks again.
Steven


Post a reply to this message

From: Alessio Sangalli
Subject: Re: combining partial images
Date: 10 Jul 2008 00:46:47
Message: <48759437$1@news.povray.org>
Nicolas George wrote:

> Why in the world would you suggest to quit Gimp and start another bloatware
> that does the same work.


He declared he's more knowledgeable with photoshop and wanted to use it
for the actual "merge".

I'd personally never merge together partial images, I consider that
feature for scene *development* only. The final rendering is, in my
opinion, a sacred process never to be interrupted :)


Post a reply to this message

From: stevenvh
Subject: Re: combining partial images
Date: 10 Jul 2008 01:40:00
Message: <web.4875a0a57ec83d1bc0721a1d0@news.povray.org>
Alessio Sangalli <ale### [at] manowebcom> wrote:
> Nicolas George wrote:
>
> I'd personally never merge together partial images, I consider that
> feature for scene *development* only. The final rendering is, in my
> opinion, a sacred process never to be interrupted :)

True, but the process doesn't always see it that way. Very frustrating if a job
aborts after being rendering for a week. All in agreement with the Laws of
Conservation of Misery. :-)


huge image + radiosity > 1 week


Post a reply to this message

From: Wolf
Subject: Re: combining partial images
Date: 10 Jul 2008 03:25:01
Message: <web.4875b8737ec83d1b883e46750@news.povray.org>
The main issue with the partial images is that Povray writes the image file in a
non-standard way in order to keep the created image files small, this prevents
most image manipulation programs from reading the file.
The file declares itself to contain the data of the complete image (the image
headers width and height information is set to the full image size), but in
reality it contains just the number of rows having been rendered by the partial
image. Most image manipulation programs are trying to read as many data as
declared in the image header, resulting in an unexpected-end-of-file while



behaviour:
8<==================================================
When rendering a subset of *columns* (+sc/+ec) POV-Ray generates a full width
image and fills he not rendered columns with black pixels. This should not be a
problem for any image reading program no matter what file format is used.

When rendering a subset of *rows* (+sr/+er) POV-Ray writes the full height into
the image file header and only writed those lines into the image that are
rendered.
This can cause problems with image reading programs that are not checking the
file while reading and just read over the end.

If POV-Ray wrote the actual height of the partial image into the image header
there would be no way to continue the trace in a later run.
===================================================>8

The main problem is to find a image manipulation program being able to handle

file.

Cheers,
Wolf


Post a reply to this message

From: SharkD
Subject: Re: combining partial images
Date: 10 Jul 2008 03:55:01
Message: <web.4875bf777ec83d1bb319b3150@news.povray.org>
So, in the end, is this a problem with POV-Ray (i.e., should the program be
altered to make it more convenient for users to accomplish tasks such as
these), or a problem with image editing software not supporting the PNG format
properly??

-Mike


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.