[Gambas-user] Bad Image format
Paul Horechuk
horechuk at ...981...
Tue Dec 9 16:43:01 CET 2014
Thank you. Specifying the image dimensions did the trick. Now that I
have a saved image, I can isolate it from the printer requirements.
On 14-12-09 09:16 AM, Fabien Bodard wrote:
> yes
>
> in pseudo code :
>
> myimage = new image(with, height, backcolor)
>
> paint.begin(myimage)
>
> paint.whatyouwant
>
> paint.end
>
> myimage.save("myfile.ext")
>
>
> 2014-12-09 15:00 GMT+01:00 Paul Horechuk <phorechuk at ...626...>:
>> The actual purpose of the code is to get rid of the DrawingArea. I have a program that currently prints an area (not an image/Picture/DrawingArea). It uses Begin(MyPrinter), various Paint commands, and Image.Load to position text and graphics, directly to the printer. The routine does work.
>>
>> Then I decided to add a print preview process. Using Begin(MyImage) and the same commands as before, save the new image to disk, and then use the Image.Load in the printer section. So following a similar process as before, I encountered the Bad Image Format error.
>>
>> Is there a working way to build a Picture/Image so that it can be saved?
>>
>> Sent from my ASUS Pad
>>
>> Fabien Bodard <gambas.fr at ...626...> wrote:
>>
>>> Le 8 déc. 2014 22:35, "Paul Horechuk" <horechuk at ...981...> a écrit :
>>>> Kubuntu 14.04 LTS x86_64
>>>> Gambas 3.6.2
>>>> ---------------------------------------------------
>>>> Dim PageImage as Image
>>>>
>>>> ...
>>>>
>>>> Public Sub Preview()
>>>> PageImage = New Image As "PageImage"
>>>> Paint.Begin(PageImage) ' Bad Format
>>>> PageImage.Load("picture.jpg", 0, 0, 100, 100)
>>>> Paint.End
>>>> End
>>>>
>>> This code is all bad... Sorry
>>> Pageimage= image.load("picture.jpg")
>>>
>>> In drawingarea_draw
>>>
>>> Public sub drawingarea1_draw()
>>> Paint.drawimage(paintimage,0,0)
>>>
>>> End
>>> I hope that is what you want to achieve.... In other case give us more code
>>> please
>>>
>>> Regards
>>>
>>>> ---------------------------------------------------
>>>>
>>>> Could someone please explain?
>>>>
>>>> --
>>>> Think Free ...
>>>> Use Open Source Software
>>>>
>>>>
>>>>
>>> ------------------------------------------------------------------------------
>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Gambas-user mailing list
>>>> Gambas-user at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>> ------------------------------------------------------------------------------
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> >from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Gambas-user mailing list
>>> Gambas-user at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
--
Think Free ...
Use Open Source Software
More information about the User
mailing list