Return-Path: X-Original-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A99B39313 for ; Fri, 25 May 2012 01:28:17 +0000 (UTC) Received: (qmail 53117 invoked by uid 500); 25 May 2012 01:28:17 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 53038 invoked by uid 500); 25 May 2012 01:28:17 -0000 Mailing-List: contact ooo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-dev@incubator.apache.org Received: (qmail 53029 invoked by uid 99); 25 May 2012 01:28:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 01:28:17 +0000 X-ASF-Spam-Status: No, hits=0.2 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jianlizhao6@hotmail.com designates 65.55.111.155 as permitted sender) Received: from [65.55.111.155] (HELO blu0-omc4-s16.blu0.hotmail.com) (65.55.111.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 01:28:08 +0000 Received: from BLU0-SMTP423 ([65.55.111.136]) by blu0-omc4-s16.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 24 May 2012 18:27:48 -0700 X-Originating-IP: [14.197.141.71] X-Originating-Email: [jianlizhao6@hotmail.com] Message-ID: Received: from tiantiana6a9fd ([14.197.141.71]) by BLU0-SMTP423.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 24 May 2012 18:27:45 -0700 From: jianlizhao To: References: Subject: how Get Bitmap file from SVG module? Date: Fri, 25 May 2012 09:27:38 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Thread-Index: Ac05vaJo3zcpOKLvS5SSLDB2+xLd1wAVzQ4g X-OriginalArrivalTime: 25 May 2012 01:27:46.0139 (UTC) FILETIME=[96BE4AB0:01CD3A15] X-Virus-Checked: Checked by ClamAV on apache.org Hi Armin: Receipt of your reply, I modified my needs. The original picture I do not need to display and modify,only to provide data to the extension,used for data analysis and processing. This = process does not need to show only need end result, the end result is saved to a = TXT file. All requirements are summarized as follows: 1)On screen Display bmp or png file, the bmp or png converted from the original pictures. 2) In the save file include two files, one is the original file.=20 In order to achieve compatibility. 3)on screen when the user delete the BMP file,in the save file, the file related to this BMP files do not save,that is also deleted. 4)In the extension, the original file for data analysis and processing, = and processing the results are saved to txt file. It should be based on the screen select the BMP file,access to the corresponding original file. Do you have any good suggestions. Thanks... Best Regards! -----=D3=CA=BC=FE=D4=AD=BC=FE----- =B7=A2=BC=FE=C8=CB: Armin Le Grand [mailto:Armin.Le.Grand@me.com]=20 =B7=A2=CB=CD=CA=B1=BC=E4: 2012=C4=EA5=D4=C224=C8=D5 22:57 =CA=D5=BC=FE=C8=CB: ooo-dev@incubator.apache.org =D6=F7=CC=E2: Re: how Get Bitmap file from SVG module? Hi jianlizhao, On 24.05.2012 16:07, jianlizhao wrote: > Hi Armin: > I am very glad to receipt your letter, >=20 > I see the following content in your blog: > There were also ODF-compatible File Format adaptions needed, more = concrete > the in ODF already contained and described multi-image support. In = ODF, the > original SVG is now embedded to the 'Pictures' folder inside the ODF = file as > one would expect from such a feature and can be easily extracted = (unzip the > ODF file and there you are). There is also a Png file written as replacement > image. The draw:frame is now multi-image capable (as the spec allows). = In > the case of a SVG it writes a good quality Png and the original SVG as > draw:image elements. Since older (and other) office versions are only > capable of loading a single (and thus the first) image, the Png is = written > first. This allows file exchange with other and older offices without > breaking backward compatibility and/or ODF file exchange. >=20 > I have two questions : > 1) I would also like to use this method to insert the picture, so that = in > document will retain the original file, the original file is there = are > other useful. To achieve this you have to add the needed code to the core (similar as jpeg and png are added). This includes import code to get the data into a Bitmap/BitmapEx. This is uniquely held (using a unique ID calculated based on the bitmap data, there is one calculation defined for each format) at the GraphicManager and can be accessed using Graphic/GraphicObject. AFAIK it is also possible to hold the original raw data at the entry in the GraphicManager (to be able to write the original again in unchanged form without needing to export it to it's format). The feature you mentioned above is needed for file formats which differ in content, in Your case this is not needed since a e.g. reduced data BitmapEx can be recreated without data loss from your raw data. It makes no sense to write both, so no need for this feature. > 2) How do I access the original file. The Graphic holding it (and the contact with the GraphicManager) may have it as raw data, but also has a link to a temporary storage (using the temp on your system) where it is swapped out. To Access, use Graphic/GraphicObject. I repeat here: It is no easy task to add a graphic format to the core. I'm also not the specialist for that, maybe someone else knows in more details about exactly what steps have to be done to implement it. HTH! > Thanks... > Best Regards! >=20 >=20 > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Armin Le Grand [mailto:Armin.Le.Grand@me.com] > =B7=A2=CB=CD=CA=B1=BC=E4: 2012=C4=EA5=D4=C224=C8=D5 18:10 > =CA=D5=BC=FE=C8=CB: ooo-dev@incubator.apache.org > =D6=F7=CC=E2: Re: how Get Bitmap file from SVG module? >=20 > Hi jianlizhao, >=20 [..] Sincerely, Armin -- ALG