Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Photoshop PSB file format in libpano
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jim Watters  
View profile  
 More options Feb 13 2011, 4:51 pm
From: Jim Watters <jwatt...@photocreations.ca>
Date: Sun, 13 Feb 2011 17:51:19 -0400
Local: Sun, Feb 13 2011 4:51 pm
Subject: Photoshop PSB file format in libpano
I have committed changes to a PhotoshopPSB branch of libpano that can handle
both PSD and PSB file formats.

It was recently brought to my attention that Adobe has opened up the PSB file
format to the public in July 2010.

http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/

PSD files are limited to 30000 pixels in both directions. PSB increases this to
300000 pixels.
The extension used to save the file is not important.
The functions to write PSD will automatically save as a PSB fileformat if either
dimension is over 30000 pixels. Or a flag can be set to force the file to be PSB.
The functions to read PSD can now read both.

The last couple versions of Photoshop can now handle 16bit layers. This has been
enabled for saving PSD files. Previously when saving as a multilayer PSD file
layers were always down sampled to 8bit. This can still be forced with a flag.

Naming of the layers was changed from L01 to 001 to accommodate a larger number
of layers.  Although all the layers can have the same name as far as Photoshop
is concerned.

I discovered some code that calculated the size of the data to be stored into a
size_t would fail.

I was working with an image 30100X15050 8bit/channel

     // Allocate memory for one channel

     count = im->width * im->height * BitsPerChannel/8 ;

     channel = (unsigned char**)mymalloc( count );

width, & height are pt_int32, & BitsPerChannel is int.
Eventhough it was stored to count as size_t by the time W*H*bpc was done the
value was greater than 32bit could hold. It was turned into a a negative number,
then when assigned to count, it was ginormous. Many more terabytes than I had.
The solution was to force the calculation to use more bits.

     count = (size_t)im->width * im->height * (BitsPerChannel/8) ;

I fixed what I found in libpano in file.c but there may be more like these.

I did some testing but needs more testing with a machine with more memory than
the 3GB I have.  I was able to create a 5.7GB 8bit per layer file.  I run out of
memory when I try the 16bit per layer file that was 30100 wide.  But I could
create smaller files.
Only with the 64bit version am I able to allocate enough memory to work we these
size images.
I only have 3GB and my OS was using most of it.  so I don't understand why the
64bit version was able to get the memory and the 23bit version could not.

I uploaded to SourceForge into an experimental folder a windows build 32&64bit
of the PTtiff2psd tool for testing.  Use this tool to combine many tiff files
into a single multilayer PSD or PSB file.
https://sourceforge.net/projects/panotools/files/experimental/
http://wiki.panotools.org/PTtiff2psd

--
Jim Watters
http://photocreations.ca


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeffrey Martin  
View profile   Translate to Translated (View Original)
 More options Feb 14 2011, 4:27 am
From: Jeffrey Martin <360cit...@gmail.com>
Date: Mon, 14 Feb 2011 01:27:57 -0800 (PST)
Local: Mon, Feb 14 2011 4:27 am
Subject: Re: Photoshop PSB file format in libpano

Wow this is great news! Very nice work Jim!

I'll contact you offlist so I can help you test it, I have 24gb ready for
you....


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Postle  
View profile  
 More options Feb 14 2011, 4:13 pm
From: Bruno Postle <br...@postle.net>
Date: Mon, 14 Feb 2011 21:13:25 +0000
Local: Mon, Feb 14 2011 4:13 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On Sun 13-Feb-2011 at 17:51 -0400, Jim Watters wrote:

>I uploaded to SourceForge into an experimental folder a windows build
>32&64bit of the PTtiff2psd tool for testing.  Use this tool to
>combine many tiff files into a single multilayer PSD or PSB file.
>https://sourceforge.net/projects/panotools/files/experimental/
>http://wiki.panotools.org/PTtiff2psd

Note that the Hugin .pto.mk files have a rule for assembling
multilayer PSD files using PTtiff2psd, so if you have this in your
PATH you should be able to create a multilayer PSB like this:

   make -f project.pto PREFIX_multilayer.psd

..or for stacked projects:

   make -f project.pto PREFIX_fused_multilayer.psd

(where PREFIX is the prefix you picked in Hugin)

--
Bruno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joergen Geerds  
View profile  
 More options Feb 16 2011, 7:32 pm
From: Joergen Geerds <jgee...@gmail.com>
Date: Wed, 16 Feb 2011 16:32:34 -0800 (PST)
Local: Wed, Feb 16 2011 7:32 pm
Subject: Re: Photoshop PSB file format in libpano
I agree with jeffrey, great work, it was something I was waiting for.
btw, the 300000px limit is for the phortoshop application, not
completely for the file format. I am not sure when photoshop will
allow for larger files files, but PTGui can produce larger than 300k
PSB files, and it might be possible thatkrpano tools also accept
larger files, but I don't know yet.
it would be great if you could implement an option for the various
compression options (i.e. make packbits the default, and not ZIP)

joergen
newyorkpanorama.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Watters  
View profile  
 More options Mar 1 2012, 11:39 am
From: Jim Watters <jwatt...@photocreations.ca>
Date: Thu, 01 Mar 2012 12:39:46 -0400
Local: Thurs, Mar 1 2012 11:39 am
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
IT has been a little over a year since this was added to a branch of libpano.
The windows binary has been downloaded over 1k times with no reported problems.
It should be merged to the main trunk for next release.

I have yet to do a merge with Mercuial and with someone willing to help step me
through it I can do it.

Jim

On 2011-02-14 5:13 PM, Bruno Postle wrote:

--
Jim Watters
http://photocreations.ca

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Postle  
View profile  
 More options Mar 2 2012, 5:52 pm
From: Bruno Postle <br...@postle.net>
Date: Fri, 2 Mar 2012 22:52:29 +0000
Local: Fri, Mar 2 2012 5:52 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On Thu 01-Mar-2012 at 12:39 -0400, Jim Watters wrote:

>IT has been a little over a year since this was added to a branch of libpano.
>The windows binary has been downloaded over 1k times with no reported problems.
>It should be merged to the main trunk for next release.

I can't get the PhotoshopPSB branch to build on Linux (fedora f15,
gcc 4.6.1):

ptpicker.c: In function 'Java_ptutils_CLoadImage':
ptpicker.c:362:21: error: 'pt_int32' undeclared (first use in this function)

I seem to remember Terry fixed these in the default branch, but then
if I merge the PSB branch into the default branch, then I get this
error:

pteditor.c: In function 'Java_pteditor_CGetImageRow':
pteditor.c:103:4: error: unknown type name 'UCHAR'

--
Bruno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Terry Duell  
View profile  
 More options Mar 2 2012, 6:05 pm
From: "Terry Duell" <tdu...@iinet.net.au>
Date: Sat, 03 Mar 2012 10:05:22 +1100
Local: Fri, Mar 2 2012 6:05 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
Hullo Bruno,

On Sat, 03 Mar 2012 09:52:29 +1100, Bruno Postle <br...@postle.net> wrote:

[snip]
> I seem to remember Terry fixed these in the default branch, but then if  
> I merge the PSB branch into the default branch, then I get this error:

> pteditor.c: In function 'Java_pteditor_CGetImageRow':
> pteditor.c:103:4: error: unknown type name 'UCHAR'

It's a bit of a guess, but uchar should be defined in stdtype.h, so I  
would suspect a missing #include <stdtype.h> somewhere. Try bunging it  
into pteditor.c and see how that goes.

Cheers,
--
Regards,
Terry Duell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Postle  
View profile  
 More options Mar 2 2012, 6:22 pm
From: Bruno Postle <br...@postle.net>
Date: Fri, 2 Mar 2012 23:22:28 +0000
Local: Fri, Mar 2 2012 6:22 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On Sat 03-Mar-2012 at 10:05 +1100, Terry Duell wrote:

>On Sat, 03 Mar 2012 09:52:29 +1100, Bruno Postle <br...@postle.net> wrote:

>>I seem to remember Terry fixed these in the default branch, but
>>then if I merge the PSB branch into the default branch, then I get
>>this error:

>>pteditor.c: In function 'Java_pteditor_CGetImageRow':
>>pteditor.c:103:4: error: unknown type name 'UCHAR'

>It's a bit of a guess, but uchar should be defined in stdtype.h, so I
>would suspect a missing #include <stdtype.h> somewhere. Try bunging
>it into pteditor.c and see how that goes.

I replaced 'UCHAR' with 'unsigned char' and it builds.  I've
committed this to the default branch along with the merge.

--
Bruno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Terry Duell  
View profile  
 More options Mar 2 2012, 6:18 pm
From: "Terry Duell" <tdu...@iinet.net.au>
Date: Sat, 03 Mar 2012 10:18:07 +1100
Local: Fri, Mar 2 2012 6:18 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On Sat, 03 Mar 2012 10:05:22 +1100, Terry Duell <tdu...@iinet.net.au>  
wrote:

[snip]

> It's a bit of a guess, but uchar should be defined in stdtype.h, so I  
> would suspect a missing #include <stdtype.h> somewhere. Try bunging it  
> into pteditor.c and see how that goes.

I may have been a bit premature!
I now see that uchar is defined in filters.h, which is included in  
pteditor.c.
Something must be haywire somewhere as pteditor.c built OK here (Fedora  
16) when I monkeyed about with the pt_int32 business.

Cheers,
--
Regards,
Terry Duell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Watters  
View profile  
 More options Mar 2 2012, 10:28 pm
From: Jim Watters <jwatt...@photocreations.ca>
Date: Fri, 02 Mar 2012 23:28:40 -0400
Local: Fri, Mar 2 2012 10:28 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On 2012-03-02 7:22 PM, Bruno Postle wrote:
> I replaced 'UCHAR' with 'unsigned char' and it builds.  I've committed this to
> the default branch along with the merge.

Thank you Bruno. I will grab and test on the weekend.

--
Jim Watters
http://photocreations.ca


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Terry Duell  
View profile  
 More options Mar 3 2012, 6:31 pm
From: "Terry Duell" <tdu...@iinet.net.au>
Date: Sun, 04 Mar 2012 10:31:20 +1100
Local: Sat, Mar 3 2012 6:31 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On Sat, 03 Mar 2012 10:18:07 +1100, Terry Duell <tdu...@iinet.net.au>  
wrote:

> On Sat, 03 Mar 2012 10:05:22 +1100, Terry Duell <tdu...@iinet.net.au>  
> wrote:
> I may have been a bit premature!
> I now see that uchar is defined in filters.h, which is included in  
> pteditor.c.
> Something must be haywire somewhere as pteditor.c built OK here (Fedora  
> 16) when I monkeyed about with the pt_int32 business.

I now see that filter.h in the default branch prior to the PSD merge  
included the following code...
//---------------------- Types  
---------------------------------------------
     49
     50 #define UCHAR   unsigned char
     51 #define USHORT  unsigned short
     52 #define ULONG   unsigned long
     53
     54 enum{
     55         _UCHAR,
     56         _USHORT,
     57         _ULONG
     58         };

but this code is missing in filter.h in the PSD branch and default since  
the merge.
This explains why pteditor.c wouldn't build in the PSD branch.
A bit of a mystery though as to how/why it came about. Didn't anyone ever  
try to build the PSD branch?

Cheers,
--
Regards,
Terry Duell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Postle  
View profile  
 More options Mar 4 2012, 3:21 pm
From: Bruno Postle <br...@postle.net>
Date: Sun, 4 Mar 2012 20:21:19 +0000
Local: Sun, Mar 4 2012 3:21 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On Fri 02-Mar-2012 at 23:28 -0400, Jim Watters wrote:

>On 2012-03-02 7:22 PM, Bruno Postle wrote:
>>I replaced 'UCHAR' with 'unsigned char' and it builds.  I've
>>committed this to the default branch along with the merge.
>Thank you Bruno. I will grab and test on the weekend.

It seems the libpano13 build is now broken on Windows:

https://bugs.launchpad.net/bugs/945523

--
Bruno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Postle  
View profile  
 More options Mar 4 2012, 3:27 pm
From: Bruno Postle <br...@postle.net>
Date: Sun, 4 Mar 2012 20:27:44 +0000
Local: Sun, Mar 4 2012 3:27 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On Sun 04-Mar-2012 at 10:31 +1100, Terry Duell wrote:

>I now see that filter.h in the default branch prior to the PSD merge
>included the following code...
>    50 #define UCHAR        unsigned char
>    51 #define USHORT  unsigned short
>    52 #define ULONG   unsigned long
>but this code is missing in filter.h in the PSD branch and default
>since the merge.

It seems Daniel did this a year ago: 8fbc76a7f4b9 "removed
unnecessary and duplicated data types"

--
Bruno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Watters  
View profile  
 More options Mar 4 2012, 5:09 pm
From: Jim Watters <jwatt...@photocreations.ca>
Date: Sun, 04 Mar 2012 18:09:40 -0400
Local: Sun, Mar 4 2012 5:09 pm
Subject: Re: [hugin-ptx] Photoshop PSB file format in libpano
On 2012-03-04 4:21 PM, Bruno Postle wrote:
> On Fri 02-Mar-2012 at 23:28 -0400, Jim Watters wrote:
>> On 2012-03-02 7:22 PM, Bruno Postle wrote:

>>> I replaced 'UCHAR' with 'unsigned char' and it builds.  I've committed this
>>> to the default branch along with the merge.

>> Thank you Bruno. I will grab and test on the weekend.

> It seems the libpano13 build is now broken on Windows:

> https://bugs.launchpad.net/bugs/945523

Thanks for the update. My weekend time disappeared I will attempt on Monday.

--
Jim Watters
http://photocreations.ca


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »