You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Charles Matthew Chen <ch...@gmail.com> on 2009/07/09 05:02:20 UTC
Re: Saving images in Sanselan
Hi Jonathan,
You can definitely use Sanselan to modify an image's metadata. I'm
not quite sure I understand exactly what problem you are seeing.
I would suggest you a) read the image entirely into memory as a
byte array. b) modify it's metadata with sanselan and write the output
to a byte array in memory c) write the byte array to a file/over your
network connection. Looking at the size of the intermediate values
should help you isolate whether the problem lies.
It would also be helpful to know: what image format the images are
in? Are the output images valid or corrupt?
Normally, I would recommend that you open an issue and attach
code/images that reproduce the problem so that we can take a look.
However, our project is the course of a transition: we're being
assimilated into the Commons project. I'm not quite sure when/if/how
our issues will be migrated, nor what issue tracking system the
Commons project uses.
Why don't you open an issue in Jira despite the transition -
perhaps we can resolve your issue before it is decommissioned.
https://issues.apache.org/jira/browse/SANSELAN
Matthew
On Wed, Jul 8, 2009 at 8:04 PM, Jonathan Giles<jo...@jogiles.co.nz> wrote:
> Hi everyone,
>
> To get to the crux of my issue: I want to be able to read/write jpeg images
> with metadata over a network connection. To do this I read/write
> input/outputstreams.
>
> I've tried a few different ways, but no matter how I do it, the file that is
> output is considerably smaller in filesize than when it went in.
>
> Is there a means through which I can get a stream of the complete image,
> modify the metadata, and then write this to file? At present I can't see any
> option for this.
>
> Please help - this is the final roadblock in my project!
> Cheers,
> Jonathan Giles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: Saving images in Sanselan
Posted by Charles Matthew Chen <ch...@gmail.com>.
Glad to hear it, Jonathan, but strictly speaking it shouldn't be necessary.
Matthew
On Wed, Jul 8, 2009 at 11:03 PM, Jonathan
Giles<jo...@jonathangiles.net> wrote:
> Charles,
>
> I was actually trying precisely this - I dropped down to using byte[] rather
> than streams, and that resolved my issue.
>
> Thanks! :-)
> Jonathan
>
> Charles Matthew Chen wrote:
>>
>> Hi Jonathan,
>>
>> You can definitely use Sanselan to modify an image's metadata. I'm
>> not quite sure I understand exactly what problem you are seeing.
>>
>> I would suggest you a) read the image entirely into memory as a
>> byte array. b) modify it's metadata with sanselan and write the output
>> to a byte array in memory c) write the byte array to a file/over your
>> network connection. Looking at the size of the intermediate values
>> should help you isolate whether the problem lies.
>>
>> It would also be helpful to know: what image format the images are
>> in? Are the output images valid or corrupt?
>>
>> Normally, I would recommend that you open an issue and attach
>> code/images that reproduce the problem so that we can take a look.
>> However, our project is the course of a transition: we're being
>> assimilated into the Commons project. I'm not quite sure when/if/how
>> our issues will be migrated, nor what issue tracking system the
>> Commons project uses.
>>
>> Why don't you open an issue in Jira despite the transition -
>> perhaps we can resolve your issue before it is decommissioned.
>>
>> https://issues.apache.org/jira/browse/SANSELAN
>>
>> Matthew
>>
>>
>> On Wed, Jul 8, 2009 at 8:04 PM, Jonathan Giles<jo...@jogiles.co.nz> wrote:
>>
>>>
>>> Hi everyone,
>>>
>>> To get to the crux of my issue: I want to be able to read/write jpeg
>>> images
>>> with metadata over a network connection. To do this I read/write
>>> input/outputstreams.
>>>
>>> I've tried a few different ways, but no matter how I do it, the file that
>>> is
>>> output is considerably smaller in filesize than when it went in.
>>>
>>> Is there a means through which I can get a stream of the complete image,
>>> modify the metadata, and then write this to file? At present I can't see
>>> any
>>> option for this.
>>>
>>> Please help - this is the final roadblock in my project!
>>> Cheers,
>>> Jonathan Giles
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org