POV-Ray : Newsgroups : povray.general : combining partial images : Re: combining partial images Server Time
26 Jun 2024 00:04:08 EDT (-0400)
  Re: combining partial images  
From: Nicolas George
Date: 9 Jul 2008 05:22:18
Message: <4874834a$1@news.povray.org>
"stevenvh"  wrote in message
<web.487371a8ec7fa205c0721a1d0@news.povray.org>:
> 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?


position (10,16) from it, pastes it into target.png at position (32,64) and
saves the result as target-new.png. It does not choke if source.png is
truncated.

use Gtk2;
my $load = Gtk2::Gdk::PixbufLoader->new;
my $input = do {
  open my $if, "<", "source.png" or die "source.png: $!\n";
  local $/;
  <$if>;
};
$load->write($input);
my $src = $load->get_pixbuf;
my $dst = Gtk2::Gdk::Pixbuf->new_from_file("target.png");
$src->copy_area(10, 16, 420, 160, $dst, 32, 64);
$dst->save("target-new.png", "png", compression => 9);
$load->close;


Post a reply to this message

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