Re: SVG background image in mobile application

2014-11-26 Thread Maxim Solodovnik
Thanks a lot!
Will definitely use this tool!
Is using FXG is preferable to SVG?

One more question:
I would like to place this background images on the bottom of the view
(centered)

I tried to do it like this:

percentWidth seems to work, but position doesn't :(
What is the proper way to position asset based on view size

On Thu, Nov 27, 2014 at 3:24 AM, OmPrakash Muppirala 
wrote:

> The SVG seems pretty complicated for the Flex compiler to handle.  So, I
> converted the SVG to FXG using Sascha's tool [1]
> Then, I was simply able to import the class in the skin and instantiate
> it.  I have sent you a pull request [2]  See if this works.
>
> Thanks,
> Om
>
> P.S. I think the converter did a great job.  Nice job, Sascha!
>
> [1] http://www.realcreation.com/S2F_Converter/
> [2] https://github.com/solomax/BgImageQuickStart/pull/1
>
> On Wed, Nov 26, 2014 at 11:23 AM, Maxim Solodovnik 
> wrote:
>
> > Thanks for the quick answer Om :)
> >
> > Here is the quickstart: https://github.com/solomax/BgImageQuickStart
> >
> >
> > On Thu, Nov 27, 2014 at 12:53 AM, OmPrakash Muppirala <
> > bigosma...@gmail.com>
> > wrote:
> >
> > > Can you post an example of what you are trying?  I can try it out and
> see
> > > what's going on.
> > >
> > > Thanks,
> > > Om
> > >
> > > On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik <
> solomax...@gmail.com
> > >
> > > wrote:
> > >
> > > > Hello All,
> > > >
> > > > I'm trying to add background image to my mobile view using following
> > > > methods
> > > >
> > > >
> > >
> >
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
> > > >
> > > >
> > >
> >
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> > > > seems to be almost the same
> > > >
> > > > The image is displayed, BUT it is so huge and seems
> width/height/scale
> > > > settings has no effect on it
> > > >
> > > > I'm using svg image created using Incscape
> > > > The image should be located on the bottom of the view
> > > > Is it possible? Do I need to convert it somehow
> > > >
> > > > Thanks in advance!
> > > >
> > > > --
> > > > WBR
> > > > Maxim aka solomax
> > > >
> > >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>



-- 
WBR
Maxim aka solomax


Re: SVG background image in mobile application

2014-11-26 Thread OmPrakash Muppirala
The SVG seems pretty complicated for the Flex compiler to handle.  So, I
converted the SVG to FXG using Sascha's tool [1]
Then, I was simply able to import the class in the skin and instantiate
it.  I have sent you a pull request [2]  See if this works.

Thanks,
Om

P.S. I think the converter did a great job.  Nice job, Sascha!

[1] http://www.realcreation.com/S2F_Converter/
[2] https://github.com/solomax/BgImageQuickStart/pull/1

On Wed, Nov 26, 2014 at 11:23 AM, Maxim Solodovnik 
wrote:

> Thanks for the quick answer Om :)
>
> Here is the quickstart: https://github.com/solomax/BgImageQuickStart
>
>
> On Thu, Nov 27, 2014 at 12:53 AM, OmPrakash Muppirala <
> bigosma...@gmail.com>
> wrote:
>
> > Can you post an example of what you are trying?  I can try it out and see
> > what's going on.
> >
> > Thanks,
> > Om
> >
> > On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik  >
> > wrote:
> >
> > > Hello All,
> > >
> > > I'm trying to add background image to my mobile view using following
> > > methods
> > >
> > >
> >
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
> > >
> > >
> >
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> > > seems to be almost the same
> > >
> > > The image is displayed, BUT it is so huge and seems width/height/scale
> > > settings has no effect on it
> > >
> > > I'm using svg image created using Incscape
> > > The image should be located on the bottom of the view
> > > Is it possible? Do I need to convert it somehow
> > >
> > > Thanks in advance!
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Re: SVG background image in mobile application

2014-11-26 Thread Maxim Solodovnik
Thanks for the quick answer Om :)

Here is the quickstart: https://github.com/solomax/BgImageQuickStart


On Thu, Nov 27, 2014 at 12:53 AM, OmPrakash Muppirala 
wrote:

> Can you post an example of what you are trying?  I can try it out and see
> what's going on.
>
> Thanks,
> Om
>
> On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik 
> wrote:
>
> > Hello All,
> >
> > I'm trying to add background image to my mobile view using following
> > methods
> >
> >
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
> >
> >
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> > seems to be almost the same
> >
> > The image is displayed, BUT it is so huge and seems width/height/scale
> > settings has no effect on it
> >
> > I'm using svg image created using Incscape
> > The image should be located on the bottom of the view
> > Is it possible? Do I need to convert it somehow
> >
> > Thanks in advance!
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>



-- 
WBR
Maxim aka solomax


Re: SVG background image in mobile application

2014-11-26 Thread OmPrakash Muppirala
Can you post an example of what you are trying?  I can try it out and see
what's going on.

Thanks,
Om

On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik 
wrote:

> Hello All,
>
> I'm trying to add background image to my mobile view using following
> methods
>
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
>
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> seems to be almost the same
>
> The image is displayed, BUT it is so huge and seems width/height/scale
> settings has no effect on it
>
> I'm using svg image created using Incscape
> The image should be located on the bottom of the view
> Is it possible? Do I need to convert it somehow
>
> Thanks in advance!
>
> --
> WBR
> Maxim aka solomax
>


SVG background image in mobile application

2014-11-26 Thread Maxim Solodovnik
Hello All,

I'm trying to add background image to my mobile view using following methods
http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
seems to be almost the same

The image is displayed, BUT it is so huge and seems width/height/scale
settings has no effect on it

I'm using svg image created using Incscape
The image should be located on the bottom of the view
Is it possible? Do I need to convert it somehow

Thanks in advance!

-- 
WBR
Maxim aka solomax


Re: SVG/SWF to FXG Converter (Win, Mac, Eclipse)

2014-11-26 Thread OmPrakash Muppirala
Great!  I will give it a try when I get a chance.  Thanks for the update.

Om

On Wed, Nov 26, 2014 at 7:58 AM, Sascha Ahrend  wrote:

> Hi Om,
>
> i don’t know, what platforms you are using, but here is already a script I
> managed to run on Illustrator CC 2014 (Mac).
>
> www.realcreation.com/S2F_Converter/AI_CC_2014.zip <
> http://www.realcreation.com/S2F_Converter/AI_CC_2014.zip>
>
> It can be moved to Adobe Illustrator CC 2014 -> Presets -> 
> -> scripts
>
> and accessed through AI’s file menu -> scripts -> ExportFileAsFXG.
>
> (
> http://www.illustratorhints.com/wp-content/uploads/2010/02/script-placement.png
> <
> http://www.illustratorhints.com/wp-content/uploads/2010/02/script-placement.png>
> )
>
> It still needs S2F Converter installed or at least the xsl part of it (+
> update path inside script).
>
> Sorry I cannot provide you with a standalone plugin panel, as I’ve seen
> that it’d require C++, what I am not familiar with.
>
> For now I just added standard SVG export settings, but you can manipulate
> them easily inside the script.
>
> I will look into a vbscript version for Windows, for what I will have to
> update the converter as well.
>
> Rgds.,
>
> Sascha
>
>
> > Am 14.11.2014 um 20:33 schrieb Sascha Ahrend :
> >
> > Well, I can’t promise any quick result, only that I will give it a try.
> >
> > Conservatively estimated it shouldn’t be too complex.
> >
> > There’s Adobe examples on exporting SVG, so adding a line to call the
> converter when finished sounds feasible.
> >
> > I’ll let you know.
> >
> > Have a nice weekend,
> >
> > Sascha
> >
> >
> >> Am 14.11.2014 um 20:09 schrieb OmPrakash Muppirala <
> bigosma...@gmail.com >:
> >>
> >> Hey, thats good to know.  I should have probably waited for some more
> time
> >> before killing the app :-)
> >>
> >> It's really impressive that this big file got converted with this much
> >> fidelity.  Awesome job!
> >>
> >> I think I asked you this before, what do you think of creating a plugin
> >> panel for Adobe Illustrator CC with this code?  Or is that too much to
> >> ask?  I think this would be a great option for a seamless workflow, i.e.
> >> being able to create FXG from the Illustrator itself.
> >>
> >> Thanks again for this work.
> >>
> >> Regards,
> >> Om
> >>
> >> On Fri, Nov 14, 2014 at 10:45 AM, Sascha Ahrend   >> wrote:
> >>
> >>> Hello Om,
> >>>
> >>> with Harbs’ help I was able to dig into the case.
> >>>
> >>> What I found is that the AI svg export (4.3 MB) is actually being
> >>> converted, although it takes while to see the fxg result (3.3 MB).
> >>> I tested it on a Mac Mini 2.5 GHz Intel Core i5 and the conversion
> inside
> >>> the standalone app took approx. 3.5 minutes at >95% CPU usage.
> >>> Then i performed the same test inside VirtualBox running Vista where it
> >>> took even 5.5 minutes with the same CPU consumption.
> >>>
> >>> The reason why the app remains unresponsive while converting on
> Windows is
> >>> that it uses the internal Webkit XSL processor for SVG conversion,
> while on
> >>> Mac it calls a native process that runs in the background.
> >>> In task manager you can see the process running quite busy. After
> >>> finishing the app becomes responsive again.
> >>> (On Mac the fxg file appears immediately, but it takes some time
> before it
> >>> gets its content.)
> >>> Unfortunately both processors (which are based on libxslt) do not
> return
> >>> any progress data, so I do not see a chance to add a progress bar to
> the
> >>> app.
> >>>
> >>> You can find the fxg output (77750 lines) here:
> >>> http://www.realcreation.com/S2F_Converter/testfxg/testfxg.fxg
> >>>
> >>> It looks like this (downscaled to 8.8%, please allow a moment to load):
> >>> http://www.realcreation.com/S2F_Converter/testfxg/testfxg.html
> >>>
> >>> Comparing it at a glance with the original file (
> >>> http://mercury.io/wp-content/uploads/2014/09/ios8_vector_zoom_out.png
>  <
> >>> http://mercury.io/wp-content/uploads/2014/09/ios8_vector_zoom_out.png
> > )
> >>> i can see the following differences:
> >>>
> >>> - Bitmap images aren’t converted (that’s an actual limitation,
> although I
> >>> will have a look to add external images to the conversion method).
> >>> - Some masks seem missing or misplaced. (I will investigate.)
> >>> - The SVG uses multiline text, while the FXG only single line (I will
> >>> check the specs.)
> >>>
> >>> I hope this helps.
> >>>
> >>> Rgds,
> >>>
> >>> Sascha
> >>>
> >>>
>  Am 12.11.2014 um 22:45 schrieb OmPrakash Muppirala <
> bigosma...@gmail.com
>  :
> 
>  Sascha,
> 
>  This is a great tool and I see a lot of potential in it.  Especially
> >>> given
>  that Adobe has stopped supporting Export to FXG in Illustrator CC.
> 
>  I tr

Re: String to ByteArray

2014-11-26 Thread Alex Harui
It is always a good idea to try to show the code you tried (without
posting a too much code).

Sounds like you actually tried ByteArray.writeUTFBytes instead of

var ba:ByteArray = new ByteArray()
ba.writeUTFBytes(someString);

-Alex

On 11/26/14, 8:24 AM, "Devesh Mishra(NABFS00)" 
wrote:

>I tried, but it seems that complier is unable to find writeUTFBytes()
>method.
>It says, Call to a possibly undefined method writeUTFBytes through a
>reference with static type Class.
>
>Flex SDK: 4.6
>AIR Version: 15.0.0.293
> 
>--
>Thanks & Regards,
>Devesh Mishra
>
>-Original Message-
>From: Alex Harui [mailto:aha...@adobe.com]
>Sent: Wednesday, November 26, 2014 9:47 PM
>To: users@flex.apache.org
>Subject: Re: String to ByteArray
>
>Base64Decoder expects Base64 text format.
>Base64Encoder would convert your String to Base64 text format, but that
>doesn’t seem very efficient.
>ByteArray.writeUTFBytes will add the String to the ByteArray.
>
>Does that help?
>-Alex
>
>On 11/26/14, 3:37 AM, "Devesh Mishra(NABFS00)" 
>wrote:
>
>>Hi,
>>
>>I am trying to get byteArray from a String using below code. But
>>getting an error.
>>
>>var _strEncode:String = "Sample String"; var _byteArr:ByteArray = new
>>ByteArray(); var decoder:Base64Decoder = new Base64Decoder();
>>decoder.decode(_strEncode); _byteArr = decoder.toByteArray();
>>
>>Error: A partial block (1 of 4 bytes) was dropped. Decoded data is
>>probably truncated!
>>
>>Any Help !
>>
>>--
>>Thanks & Regards,
>>Devesh Mishra
>>
>>~~Disclaimer~~~
>>~~~ ~
>>Information contained and transmitted by this e-mail is confidential
>>and proprietary to IGATE and its affiliates and is intended for use
>>only by the recipient. If you are not the intended recipient, you are
>>hereby notified that any dissemination, distribution, copying or use of
>>this e-mail is strictly prohibited and you are requested to delete this
>>e-mail immediately and notify the originator or mailad...@igate.com
>>. IGATE does not enter into any agreement
>>with any party by e-mail. Any views expressed by an individual do not
>>necessarily reflect the view of IGATE. IGATE is not responsible for the
>>consequences of any actions taken on the basis of information provided,
>>through this email. The contents of an attachment to this e-mail may
>>contain software viruses, which could damage your own computer system.
>>While IGATE has taken every reasonable precaution to minimise this
>>risk, we cannot accept liability for any damage which you sustain as a
>>result of software viruses. You should carry out your own virus checks
>>before opening an attachment. To know more about IGATE please visit
>>www.igate.com .
>>~~~
>>~~~ ~~
>
>
>~~Disclaimer~~
>~
>Information contained and transmitted by this e-mail is confidential and
>proprietary to IGATE and its affiliates and is intended for use only by
>the recipient. If you are not the intended recipient, you are hereby
>notified that any dissemination, distribution, copying or use of this
>e-mail is strictly prohibited and you are requested to delete this e-mail
>immediately and notify the originator or mailad...@igate.com
>. IGATE does not enter into any agreement
>with any party by e-mail. Any views expressed by an individual do not
>necessarily reflect the view of IGATE. IGATE is not responsible for the
>consequences of any actions taken on the basis of information provided,
>through this email. The contents of an attachment to this e-mail may
>contain software viruses, which could damage your own computer system.
>While IGATE has taken every reasonable precaution to minimise this risk,
>we cannot accept liability for any damage which you sustain as a result
>of software viruses. You should carry out your own virus checks before
>opening an attachment. To know more about IGATE please visit
>www.igate.com .
>~~
>~~



Re: String to ByteArray

2014-11-26 Thread Radu Hahn
Alex is right, except that you should use: _byteArr.writeUTFBytes.
Radu

On Wed, Nov 26, 2014 at 10:24 AM, Devesh Mishra(NABFS00) <
devesh.dmis...@igate.com> wrote:

> I tried, but it seems that complier is unable to find writeUTFBytes()
> method.
> It says, Call to a possibly undefined method writeUTFBytes through a
> reference with static type Class.
>
> Flex SDK: 4.6
> AIR Version: 15.0.0.293
>
> --
> Thanks & Regards,
> Devesh Mishra
>
> -Original Message-
> From: Alex Harui [mailto:aha...@adobe.com]
> Sent: Wednesday, November 26, 2014 9:47 PM
> To: users@flex.apache.org
> Subject: Re: String to ByteArray
>
> Base64Decoder expects Base64 text format.
> Base64Encoder would convert your String to Base64 text format, but that
> doesn’t seem very efficient.
> ByteArray.writeUTFBytes will add the String to the ByteArray.
>
> Does that help?
> -Alex
>
> On 11/26/14, 3:37 AM, "Devesh Mishra(NABFS00)" 
> wrote:
>
> >Hi,
> >
> >I am trying to get byteArray from a String using below code. But
> >getting an error.
> >
> >var _strEncode:String = "Sample String"; var _byteArr:ByteArray = new
> >ByteArray(); var decoder:Base64Decoder = new Base64Decoder();
> >decoder.decode(_strEncode); _byteArr = decoder.toByteArray();
> >
> >Error: A partial block (1 of 4 bytes) was dropped. Decoded data is
> >probably truncated!
> >
> >Any Help !
> >
> >--
> >Thanks & Regards,
> >Devesh Mishra
> >
> >~~Disclaimer~~~
> >~~~ ~
> >Information contained and transmitted by this e-mail is confidential
> >and proprietary to IGATE and its affiliates and is intended for use
> >only by the recipient. If you are not the intended recipient, you are
> >hereby notified that any dissemination, distribution, copying or use of
> >this e-mail is strictly prohibited and you are requested to delete this
> >e-mail immediately and notify the originator or mailad...@igate.com
> >. IGATE does not enter into any agreement
> >with any party by e-mail. Any views expressed by an individual do not
> >necessarily reflect the view of IGATE. IGATE is not responsible for the
> >consequences of any actions taken on the basis of information provided,
> >through this email. The contents of an attachment to this e-mail may
> >contain software viruses, which could damage your own computer system.
> >While IGATE has taken every reasonable precaution to minimise this
> >risk, we cannot accept liability for any damage which you sustain as a
> >result of software viruses. You should carry out your own virus checks
> >before opening an attachment. To know more about IGATE please visit
> >www.igate.com .
> >~~~
> >~~~ ~~
>
>
>
> ~~Disclaimer~~~
> Information contained and transmitted by this e-mail is confidential and
> proprietary to IGATE and its affiliates and is intended for use only by the
> recipient. If you are not the intended recipient, you are hereby notified
> that any dissemination, distribution, copying or use of this e-mail is
> strictly prohibited and you are requested to delete this e-mail immediately
> and notify the originator or mailad...@igate.com  mailad...@igate.com>. IGATE does not enter into any agreement with any
> party by e-mail. Any views expressed by an individual do not necessarily
> reflect the view of IGATE. IGATE is not responsible for the consequences of
> any actions taken on the basis of information provided, through this email.
> The contents of an attachment to this e-mail may contain software viruses,
> which could damage your own computer system. While IGATE has taken every
> reasonable precaution to minimise this risk, we cannot accept liability for
> any damage which you sustain as a result of software viruses. You should
> carry out your own virus checks before opening an attachment. To know more
> about IGATE please visit www.igate.com .
>
> 
>


RE: String to ByteArray

2014-11-26 Thread Devesh Mishra(NABFS00)
I tried, but it seems that complier is unable to find writeUTFBytes() method.
It says, Call to a possibly undefined method writeUTFBytes through a reference 
with static type Class.

Flex SDK: 4.6
AIR Version: 15.0.0.293
 
--
Thanks & Regards,
Devesh Mishra

-Original Message-
From: Alex Harui [mailto:aha...@adobe.com] 
Sent: Wednesday, November 26, 2014 9:47 PM
To: users@flex.apache.org
Subject: Re: String to ByteArray

Base64Decoder expects Base64 text format.
Base64Encoder would convert your String to Base64 text format, but that doesn’t 
seem very efficient.
ByteArray.writeUTFBytes will add the String to the ByteArray.

Does that help?
-Alex

On 11/26/14, 3:37 AM, "Devesh Mishra(NABFS00)" 
wrote:

>Hi,
>
>I am trying to get byteArray from a String using below code. But 
>getting an error.
>
>var _strEncode:String = "Sample String"; var _byteArr:ByteArray = new 
>ByteArray(); var decoder:Base64Decoder = new Base64Decoder(); 
>decoder.decode(_strEncode); _byteArr = decoder.toByteArray();
>
>Error: A partial block (1 of 4 bytes) was dropped. Decoded data is 
>probably truncated!
>
>Any Help !
>
>--
>Thanks & Regards,
>Devesh Mishra
>
>~~Disclaimer~~~
>~~~ ~
>Information contained and transmitted by this e-mail is confidential 
>and proprietary to IGATE and its affiliates and is intended for use 
>only by the recipient. If you are not the intended recipient, you are 
>hereby notified that any dissemination, distribution, copying or use of 
>this e-mail is strictly prohibited and you are requested to delete this 
>e-mail immediately and notify the originator or mailad...@igate.com 
>. IGATE does not enter into any agreement 
>with any party by e-mail. Any views expressed by an individual do not 
>necessarily reflect the view of IGATE. IGATE is not responsible for the 
>consequences of any actions taken on the basis of information provided, 
>through this email. The contents of an attachment to this e-mail may 
>contain software viruses, which could damage your own computer system.
>While IGATE has taken every reasonable precaution to minimise this 
>risk, we cannot accept liability for any damage which you sustain as a 
>result of software viruses. You should carry out your own virus checks 
>before opening an attachment. To know more about IGATE please visit 
>www.igate.com .
>~~~
>~~~ ~~


~~Disclaimer~~~
Information contained and transmitted by this e-mail is confidential and 
proprietary to IGATE and its affiliates and is intended for use only by the 
recipient. If you are not the intended recipient, you are hereby notified that 
any dissemination, distribution, copying or use of this e-mail is strictly 
prohibited and you are requested to delete this e-mail immediately and notify 
the originator or mailad...@igate.com . IGATE does 
not enter into any agreement with any party by e-mail. Any views expressed by 
an individual do not necessarily reflect the view of IGATE. IGATE is not 
responsible for the consequences of any actions taken on the basis of 
information provided, through this email. The contents of an attachment to this 
e-mail may contain software viruses, which could damage your own computer 
system. While IGATE has taken every reasonable precaution to minimise this 
risk, we cannot accept liability for any damage which you sustain as a result 
of software viruses. You should carry out your own virus checks before opening 
an attachment. To know more about IGATE please visit www.igate.com 
.



Re: String to ByteArray

2014-11-26 Thread Alex Harui
Base64Decoder expects Base64 text format.
Base64Encoder would convert your String to Base64 text format, but that
doesn’t seem very efficient.
ByteArray.writeUTFBytes will add the String to the ByteArray.

Does that help?
-Alex

On 11/26/14, 3:37 AM, "Devesh Mishra(NABFS00)" 
wrote:

>Hi,
>
>I am trying to get byteArray from a String using below code. But getting
>an error.
>
>var _strEncode:String = "Sample String";
>var _byteArr:ByteArray = new ByteArray();
>var decoder:Base64Decoder = new Base64Decoder();
>decoder.decode(_strEncode);
>_byteArr = decoder.toByteArray();
>
>Error: A partial block (1 of 4 bytes) was dropped. Decoded data is
>probably truncated!
>
>Any Help !
>
>--
>Thanks & Regards,
>Devesh Mishra
>
>~~Disclaimer~~
>~
>Information contained and transmitted by this e-mail is confidential and
>proprietary to IGATE and its affiliates and is intended for use only by
>the recipient. If you are not the intended recipient, you are hereby
>notified that any dissemination, distribution, copying or use of this
>e-mail is strictly prohibited and you are requested to delete this e-mail
>immediately and notify the originator or mailad...@igate.com
>. IGATE does not enter into any agreement
>with any party by e-mail. Any views expressed by an individual do not
>necessarily reflect the view of IGATE. IGATE is not responsible for the
>consequences of any actions taken on the basis of information provided,
>through this email. The contents of an attachment to this e-mail may
>contain software viruses, which could damage your own computer system.
>While IGATE has taken every reasonable precaution to minimise this risk,
>we cannot accept liability for any damage which you sustain as a result
>of software viruses. You should carry out your own virus checks before
>opening an attachment. To know more about IGATE please visit
>www.igate.com .
>~~
>~~



Re: SVG/SWF to FXG Converter (Win, Mac, Eclipse)

2014-11-26 Thread Sascha Ahrend
Hi Om,

i don’t know, what platforms you are using, but here is already a script I 
managed to run on Illustrator CC 2014 (Mac).

www.realcreation.com/S2F_Converter/AI_CC_2014.zip 


It can be moved to Adobe Illustrator CC 2014 -> Presets ->  -> 
scripts

and accessed through AI’s file menu -> scripts -> ExportFileAsFXG.

( 
http://www.illustratorhints.com/wp-content/uploads/2010/02/script-placement.png 

 )

It still needs S2F Converter installed or at least the xsl part of it (+ update 
path inside script).

Sorry I cannot provide you with a standalone plugin panel, as I’ve seen that 
it’d require C++, what I am not familiar with.

For now I just added standard SVG export settings, but you can manipulate them 
easily inside the script.

I will look into a vbscript version for Windows, for what I will have to update 
the converter as well.

Rgds.,

Sascha
 

> Am 14.11.2014 um 20:33 schrieb Sascha Ahrend :
> 
> Well, I can’t promise any quick result, only that I will give it a try.
> 
> Conservatively estimated it shouldn’t be too complex.
> 
> There’s Adobe examples on exporting SVG, so adding a line to call the 
> converter when finished sounds feasible.
> 
> I’ll let you know.
> 
> Have a nice weekend,
> 
> Sascha
> 
> 
>> Am 14.11.2014 um 20:09 schrieb OmPrakash Muppirala > >:
>> 
>> Hey, thats good to know.  I should have probably waited for some more time
>> before killing the app :-)
>> 
>> It's really impressive that this big file got converted with this much
>> fidelity.  Awesome job!
>> 
>> I think I asked you this before, what do you think of creating a plugin
>> panel for Adobe Illustrator CC with this code?  Or is that too much to
>> ask?  I think this would be a great option for a seamless workflow, i.e.
>> being able to create FXG from the Illustrator itself.
>> 
>> Thanks again for this work.
>> 
>> Regards,
>> Om
>> 
>> On Fri, Nov 14, 2014 at 10:45 AM, Sascha Ahrend >  > >> wrote:
>> 
>>> Hello Om,
>>> 
>>> with Harbs’ help I was able to dig into the case.
>>> 
>>> What I found is that the AI svg export (4.3 MB) is actually being
>>> converted, although it takes while to see the fxg result (3.3 MB).
>>> I tested it on a Mac Mini 2.5 GHz Intel Core i5 and the conversion inside
>>> the standalone app took approx. 3.5 minutes at >95% CPU usage.
>>> Then i performed the same test inside VirtualBox running Vista where it
>>> took even 5.5 minutes with the same CPU consumption.
>>> 
>>> The reason why the app remains unresponsive while converting on Windows is
>>> that it uses the internal Webkit XSL processor for SVG conversion, while on
>>> Mac it calls a native process that runs in the background.
>>> In task manager you can see the process running quite busy. After
>>> finishing the app becomes responsive again.
>>> (On Mac the fxg file appears immediately, but it takes some time before it
>>> gets its content.)
>>> Unfortunately both processors (which are based on libxslt) do not return
>>> any progress data, so I do not see a chance to add a progress bar to the
>>> app.
>>> 
>>> You can find the fxg output (77750 lines) here:
>>> http://www.realcreation.com/S2F_Converter/testfxg/testfxg.fxg
>>> 
>>> It looks like this (downscaled to 8.8%, please allow a moment to load):
>>> http://www.realcreation.com/S2F_Converter/testfxg/testfxg.html
>>> 
>>> Comparing it at a glance with the original file (
>>> http://mercury.io/wp-content/uploads/2014/09/ios8_vector_zoom_out.png 
>>>  <
>>> http://mercury.io/wp-content/uploads/2014/09/ios8_vector_zoom_out.png 
>>> > )
>>> i can see the following differences:
>>> 
>>> - Bitmap images aren’t converted (that’s an actual limitation, although I
>>> will have a look to add external images to the conversion method).
>>> - Some masks seem missing or misplaced. (I will investigate.)
>>> - The SVG uses multiline text, while the FXG only single line (I will
>>> check the specs.)
>>> 
>>> I hope this helps.
>>> 
>>> Rgds,
>>> 
>>> Sascha
>>> 
>>> 
 Am 12.11.2014 um 22:45 schrieb OmPrakash Muppirala >>> :
 
 Sascha,
 
 This is a great tool and I see a lot of potential in it.  Especially
>>> given
 that Adobe has stopped supporting Export to FXG in Illustrator CC.
 
 I tried a pretty detailed AI file from here [1], exported it to SVG.
>>> Then
 I used your tool to try to export it to FXG.  Upon importing, the app
 became unresponsive.  Can you please take a look and see what's going on?
 
 Also, is this code available somewhere for us to take a look?
 
 Thanks,
 Om
 
 [1] http://mercury.io/blog/ios-8-illustrator

Re: String to ByteArray

2014-11-26 Thread Alon Levy
On 11/26/2014 01:37 PM, Devesh Mishra(NABFS00) wrote:
> Hi,
>
> I am trying to get byteArray from a String using below code. But getting an 
> error.
>
> var _strEncode:String = "Sample String";

This is a 13 byte string (no nul at the end iirc), so it seems from the
error message (didn't try this code) the converted is telling you it
doesn't convert partial words (a word here being 4 bytes).

> var _byteArr:ByteArray = new ByteArray();
> var decoder:Base64Decoder = new Base64Decoder();
> decoder.decode(_strEncode);
> _byteArr = decoder.toByteArray();
>
> Error: A partial block (1 of 4 bytes) was dropped. Decoded data is probably 
> truncated!
>
> Any Help !
>
> --
> Thanks & Regards,
> Devesh Mishra
>
> ~~Disclaimer~~~
> Information contained and transmitted by this e-mail is confidential and 
> proprietary to IGATE and its affiliates and is intended for use only by the 
> recipient. If you are not the intended recipient, you are hereby notified 
> that any dissemination, distribution, copying or use of this e-mail is 
> strictly prohibited and you are requested to delete this e-mail immediately 
> and notify the originator or mailad...@igate.com 
> . IGATE does not enter into any agreement with 
> any party by e-mail. Any views expressed by an individual do not necessarily 
> reflect the view of IGATE. IGATE is not responsible for the consequences of 
> any actions taken on the basis of information provided, through this email. 
> The contents of an attachment to this e-mail may contain software viruses, 
> which could damage your own computer system. While IGATE has taken every 
> reasonable precaution to minimise this risk, we cannot accept liability for 
> any damage which you sustain as a result of software viruses. You should 
> carry out your own virus checks before opening an attachment. To know more 
> about IGATE please visit www.igate.com .
> 
>




String to ByteArray

2014-11-26 Thread Devesh Mishra(NABFS00)
Hi,

I am trying to get byteArray from a String using below code. But getting an 
error.

var _strEncode:String = "Sample String";
var _byteArr:ByteArray = new ByteArray();
var decoder:Base64Decoder = new Base64Decoder();
decoder.decode(_strEncode);
_byteArr = decoder.toByteArray();

Error: A partial block (1 of 4 bytes) was dropped. Decoded data is probably 
truncated!

Any Help !

--
Thanks & Regards,
Devesh Mishra

~~Disclaimer~~~
Information contained and transmitted by this e-mail is confidential and 
proprietary to IGATE and its affiliates and is intended for use only by the 
recipient. If you are not the intended recipient, you are hereby notified that 
any dissemination, distribution, copying or use of this e-mail is strictly 
prohibited and you are requested to delete this e-mail immediately and notify 
the originator or mailad...@igate.com . IGATE does 
not enter into any agreement with any party by e-mail. Any views expressed by 
an individual do not necessarily reflect the view of IGATE. IGATE is not 
responsible for the consequences of any actions taken on the basis of 
information provided, through this email. The contents of an attachment to this 
e-mail may contain software viruses, which could damage your own computer 
system. While IGATE has taken every reasonable precaution to minimise this 
risk, we cannot accept liability for any damage which you sustain as a result 
of software viruses. You should carry out your own virus checks before opening 
an attachment. To know more about IGATE please visit www.igate.com 
.