Opening jpg images in Eiffel 6

7 messages Options Options
Embed this Post
Permalink
cooped

Opening jpg images in Eiffel 6

Reply Threaded MoreMore options
Print post
Permalink
Hello Eiffel experts,
after only attempting very trivial tasks in Eiffel previously, I've decided
the best way to learn Eiffel is to try something a little more substantial.
The first step in my project is to write a Vision2 app that is able to open
and view a .jpg file. Second I'd like to be able to clip it then save the
.jpg file and third I'd like to be able to view the exif info. Further steps
will be dependent on me getting this far  ;)
Looking through EiffelMedia I see that some of the examples load .jpg files,
for example lovely loads matterhorn.jpg as a background image. However, the
EiffelMedia 0.9 examples don't work with the version of EiffelStudio I have
installed (EiffelStudio 6 (6.0.6.7183 GPL Edition)). I get the following
message when I try to compile:
Error code: VYCQ(2)
Error: current class conforms to target of conversion query.
What to do: make sure current class does not conform to target of
   conversion query or remove the target from the type list.

Class: EM_VECTOR4F
Feature name: to_reference
Conversion type: EM_VECTOR4F_REF

I see four options:
1) Go back to using an older version of Eiffel
2) Wait until I can get EiffelMedia working with ES6 (not sure if this is my
problem or a result of ES 6 implementing new language concepts).
3) Find another library function to convert .jpgs into pixmaps
4) Write my own functions to load and save .jpgs

Any advice appreciated.

Thanks


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
rfo

RE: Opening jpg images in Eiffel 6

Reply Threaded MoreMore options
Print post
Permalink
Hello Don!

This is actually not a problem with 6.0 per se (i.e. it's not an EiffelStudio bug).  And don't bother back-reving, as the same issue existed with 5.7.
The problem is that this explicit conversion is no longer needed and in fact has become illegal, hence the error.

The fix is very simple indeed.
In your em_vector4f.e file, simply comment out or remove the offending code (it didn't used to be offending, and I mean nothing negative by using the expression), as in:

--RFO to_reference: {EM_VECTOR4F_REF,
--RFO ANY},

You will find a handful of such files, and the same fix works for all.

Best regards,

     R

==================================================
Roger F. Osmond
----------------------------------------
Amalasoft Corporation
273 Harwood Avenue
Littleton, MA 01460


> -------- Original Message --------
> Subject: [eiffel_software] Opening jpg images in Eiffel 6
> From: Don <cooped02@...>
> Date: Sun, April 01, 2007 3:31 am
> To: eiffel_software@...
>
> Hello Eiffel experts,
> after only attempting very trivial tasks in Eiffel previously, I've
> decided
> the best way to learn Eiffel is to try something a little more
> substantial.
> The first step in my project is to write a Vision2 app that is able to
> open
> and view a .jpg file. Second I'd like to be able to clip it then save the
> .jpg file and third I'd like to be able to view the exif info. Further
> steps
> will be dependent on me getting this far  ;)
> Looking through EiffelMedia I see that some of the examples load .jpg
> files,
> for example lovely loads matterhorn.jpg as a background image.
> However, the
> EiffelMedia 0.9 examples don't work with the version of EiffelStudio I
> have
> installed (EiffelStudio 6 (6.0.6.7183 GPL Edition)). I get the following
> message when I try to compile:
> Error code: VYCQ(2)
> Error: current class conforms to target of conversion query.
> What to do: make sure current class does not conform to target of
>    conversion query or remove the target from the type list.
>
> Class: EM_VECTOR4F
> Feature name: to_reference
> Conversion type: EM_VECTOR4F_REF
>
> I see four options:
> 1) Go back to using an older version of Eiffel
> 2) Wait until I can get EiffelMedia working with ES6 (not sure if this
> is my
> problem or a result of ES 6 implementing new language concepts).
> 3) Find another library function to convert .jpgs into pixmaps
> 4) Write my own functions to load and save .jpgs
>
> Any advice appreciated.
>
> Thanks


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
rfo

RE: Opening jpg images in Eiffel 6

Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by cooped
Hello Again!

I just re-read your posting and I see a worrisome combination.  You want to build a Vision app, but you are using the eiffelmedia library.  This is certainly possible, but not for the faint of heart.  eiffelmedia applications have their own main event loop, as do EiffelVision applications. Once you launch the eiffelmedia application, you are pretty much out of the EiffelVision business.  You might not have realized this.
For the application you describe, the combination might actually work, but you will have to be careful.   Perhaps some of the eiffelmedia experts out there can advise as to the best method by which to use the jpg support in eiffelmedia, without instantiating an eiffelmedia application (with its main event loop).  If that can be accomplished, then you will indeed have a vision2 application and you can have all sorts of fun with it - and have predictable behavior.  If not, you will effectively have an eiffelmedia application inside a vision2 main window.  That is far less satisfying.
This is not intended as a knock on eiffelmedia, by the way.  It's an impressive body of work.  The issue is only with the interaction between the two rather different libraries.  I would hope someday in the future, we might be able to meld them better, perhaps adopting the eiffelmedia event handling into vision2.  I think this would benefit Windows apps especially, as timing is more controllable and predictable with eiffelmedia than with Win32.

Best regards,
     R

==================================================
Roger F. Osmond
----------------------------------------
Amalasoft Corporation
273 Harwood Avenue
Littleton, MA 01460


> -------- Original Message --------
> Subject: [eiffel_software] Opening jpg images in Eiffel 6
> From: Don <cooped02@...>
> Date: Sun, April 01, 2007 3:31 am
> To: eiffel_software@...
>
> Hello Eiffel experts,
> after only attempting very trivial tasks in Eiffel previously, I've
> decided
> the best way to learn Eiffel is to try something a little more
> substantial.
> The first step in my project is to write a Vision2 app that is able to
> open
> and view a .jpg file. Second I'd like to be able to clip it then save the
> .jpg file and third I'd like to be able to view the exif info. Further
> steps
> will be dependent on me getting this far  ;)
> Looking through EiffelMedia I see that some of the examples load .jpg
> files,
> for example lovely loads matterhorn.jpg as a background image.
> However, the
> EiffelMedia 0.9 examples don't work with the version of EiffelStudio I
> have
> installed (EiffelStudio 6 (6.0.6.7183 GPL Edition)). I get the following
> message when I try to compile:
> Error code: VYCQ(2)
> Error: current class conforms to target of conversion query.
> What to do: make sure current class does not conform to target of
>    conversion query or remove the target from the type list.
>
> Class: EM_VECTOR4F
> Feature name: to_reference
> Conversion type: EM_VECTOR4F_REF
>
> I see four options:
> 1) Go back to using an older version of Eiffel
> 2) Wait until I can get EiffelMedia working with ES6 (not sure if this
> is my
> problem or a result of ES 6 implementing new language concepts).
> 3) Find another library function to convert .jpgs into pixmaps
> 4) Write my own functions to load and save .jpgs
>
> Any advice appreciated.
>
> Thanks


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
Emmanuel Stapf

RE: Opening jpg images in Eiffel 6

Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by cooped
> The first step in my project is to write a Vision2 app that
> is able to open and view a .jpg file. Second I'd like to be

Using EV_PIXEL_BUFFER you can actually load a .jpg on both Unix and Windows.
That might help you however it does not extract the meta information in it.

Regards,
Manu



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Alex Rice

Re: Opening jpg images in Eiffel 6

Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by rfo
I am pretty sure there is a vision2 canvas-widget in eiffelmedia which
would bridge the gap. i can't remember the class name though.

Alex

On 4/1/07, rfo@... <rfo@...> wrote:
> Hello Again!
>
> I just re-read your posting and I see a worrisome combination.  You want to build a Vision app, but you are using the eiffelmedia library.  This is certainly possible, but not for the faint of heart.  eiffelmedia applications have their own main event loop, as do EiffelVision applications. Once you launch the eiffelmedia application, you are pretty much out of the EiffelVision business.  You might not have realized this.
> For the application you describe, the combination might actually work, but you will have to be careful.   Perhaps some of the eiffelmedia experts out there can advise as to the best method by which to use the jpg support in eiffelmedia, without instantiating an eiffelmedia application (with its main event loop).  If that can be accomplished, then you will indeed have a vision2 application and you can have all sorts of fun with it - and have predictable behavior.  If not, you will effectively have an eiffelmedia application inside a vision2 main window.  That is far less satisfying.
> This is not intended as a knock on eiffelmedia, by the way.  It's an impressive body of work.  The issue is only with the interaction between the two rather different libraries.  I would hope someday in the future, we might be able to meld them better, perhaps adopting the eiffelmedia event handling into vision2.  I think this would benefit Windows apps especially, as timing is more controllable and predictable with eiffelmedia than with Win32.
>
> Best regards,
>      R
>


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
Peter Gummer-2

Re: Opening jpg images in Eiffel 6

Reply Threaded MoreMore options
Print post
Permalink
Alex Rice wrote:
>I am pretty sure there is a vision2 canvas-widget in eiffelmedia which
> would bridge the gap. i can't remember the class name though.

EM_EV_WIDGET?

- Peter Gummer



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
cooped

Re: Opening jpg images in Eiffel 6

Reply Threaded MoreMore options
Print post
Permalink
Thanks for all of the replies.

From what I understand:
1) trying to use EiffelMedia and Vision2 combined will require more advanced skills than I have at the moment. I had already tried the deleting of to_reference: {EM_VECTOR4F_REF, ANY}, but the C compilation failed. I thought because of my deletions but perhaps something is not quite set up right. After trying again I notice the failure is in the linking, so my setup is probably the culprit.
2) I don't need to use EiffelMedia because I can use EV_PIXEL_BUFFER to load the image from a .jpg file. I thought the exif data would be something I have to work through myself.
3) I should look at EM_EV_WIDGET.