Re: [julia-users] Escher image update

2015-10-14 Thread Shashi Gowda
This is browser caching at work

one way to resolve this is to just imread the image instead of loading it
using image() which just creates the equivalent of an  HTML tag...

e.g.

using Images

run(`convert a.jpg  assets/a.jpg`)
imread("assets/a.jpg")


On Wed, Oct 14, 2015 at 3:52 AM, Yakir Gagnon <12.ya...@gmail.com> wrote:

>
>
> I have some widgets that run imagemagick updating images in `assets/`, and
> the only way I can get those to update with `image` is to change their
> names...
> So if I just do this:
> ```julia
> run(`convert a.jpg  assets/a.jpg`)
> image("assets/a.jpg")
> ```
> the image doesn't get updated. But this craziness works:
> ```julia
> name = rand(Int)
> run(`convert a.jpg  assets/$name.jpg`)
> image("assets/$name.jpg")
> ```
> Isn't there a better way?
>


Re: [julia-users] Escher image update

2015-10-14 Thread Shashi Gowda
Sorry the problem is actually not even browser caching... what happens is
Escher thinks there is nothing to update because the URL attribute remains
the same...

imread is a good solution although slower. Another good solution is the one
you yourself gave if you can figure out a way to clean up all the temporary
files it creates.

On Wed, Oct 14, 2015 at 10:19 PM, Shashi Gowda 
wrote:

> This is browser caching at work
>
> one way to resolve this is to just imread the image instead of loading it
> using image() which just creates the equivalent of an  HTML tag...
>
> e.g.
>
> using Images
>
> run(`convert a.jpg  assets/a.jpg`)
> imread("assets/a.jpg")
>
>
> On Wed, Oct 14, 2015 at 3:52 AM, Yakir Gagnon <12.ya...@gmail.com> wrote:
>
>>
>>
>> I have some widgets that run imagemagick updating images in `assets/`,
>> and the only way I can get those to update with `image` is to change their
>> names...
>> So if I just do this:
>> ```julia
>> run(`convert a.jpg  assets/a.jpg`)
>> image("assets/a.jpg")
>> ```
>> the image doesn't get updated. But this craziness works:
>> ```julia
>> name = rand(Int)
>> run(`convert a.jpg  assets/$name.jpg`)
>> image("assets/$name.jpg")
>> ```
>> Isn't there a better way?
>>
>
>


Re: [julia-users] Escher image update

2015-10-14 Thread Yakir Gagnon
Thanks, yea I just asynchronously clean everything *.jpg in assets/ before
I continue with the rest of the actions in the lift.


Yakir Gagnon
The Queensland Brain Institute (Building #79)
The University of Queensland
Brisbane QLD 4072
Australia

cell +61 (0)424 393 332
work +61 (0)733 654 089

On Thu, Oct 15, 2015 at 2:55 AM, Shashi Gowda 
wrote:

> Sorry the problem is actually not even browser caching... what happens is
> Escher thinks there is nothing to update because the URL attribute remains
> the same...
>
> imread is a good solution although slower. Another good solution is the
> one you yourself gave if you can figure out a way to clean up all the
> temporary files it creates.
>
> On Wed, Oct 14, 2015 at 10:19 PM, Shashi Gowda 
> wrote:
>
>> This is browser caching at work
>>
>> one way to resolve this is to just imread the image instead of loading it
>> using image() which just creates the equivalent of an  HTML tag...
>>
>> e.g.
>>
>> using Images
>>
>> run(`convert a.jpg  assets/a.jpg`)
>> imread("assets/a.jpg")
>>
>>
>> On Wed, Oct 14, 2015 at 3:52 AM, Yakir Gagnon <12.ya...@gmail.com> wrote:
>>
>>>
>>>
>>> I have some widgets that run imagemagick updating images in `assets/`,
>>> and the only way I can get those to update with `image` is to change their
>>> names...
>>> So if I just do this:
>>> ```julia
>>> run(`convert a.jpg  assets/a.jpg`)
>>> image("assets/a.jpg")
>>> ```
>>> the image doesn't get updated. But this craziness works:
>>> ```julia
>>> name = rand(Int)
>>> run(`convert a.jpg  assets/$name.jpg`)
>>> image("assets/$name.jpg")
>>> ```
>>> Isn't there a better way?
>>>
>>
>>
>


Re: [julia-users] Escher image

2015-09-29 Thread Shashi Gowda
You can put the image in the assets/ directory under the directory you
started the server in and then show it with image("assets/img.jpg")

On Tue, Sep 29, 2015, 11:50 AM Yakir Gagnon <12.ya...@gmail.com> wrote:

> How do you show a local image (say it’s in the directory where you ran escher
> --serve)?
> ​
>


Re: [julia-users] Escher image

2015-09-29 Thread Yakir Gagnon
Thanks!

On Tuesday, September 29, 2015 at 9:55:06 PM UTC+10, Shashi Gowda wrote:
>
> You can put the image in the assets/ directory under the directory you 
> started the server in and then show it with image("assets/img.jpg")
>
> On Tue, Sep 29, 2015, 11:50 AM Yakir Gagnon <12.y...@gmail.com 
> > wrote:
>
>> How do you show a local image (say it’s in the directory where you ran 
>> escher 
>> --serve)?
>> ​
>>
>