HPDFPRINT IMAGE Image cannot be loaded

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by AUGE_OHR »

hi,

i have test it and it seems it use old VFW Format

Code: Select all

   capCreateCaptureWindowA("CapWindow" ...
i wonder that it still work with Flash while you can't use it direct under Windows OS() für new "Hello" CAM.

---

i have not work on my CAM Stuff since i got the Problem but i found a Solution using DirectShow.
Sample are VLC where you can choise CAM and \\DShow Option.

i have not work on it so i can't provide a ActiveX VLC Sample yet.
have fun
Jimmy
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by mustafa »

Hola amigo Franco
Creo que el problema es como se salva la
imagen que se ha capturado de "camera.swf"

Fijate en el informe del fichero 00002.jpg
cargado luego con Paint de Windows y salvado
como 00021.jpg .
El Original no tiene ni Compresión ni Resolución

Por esto está dando Error al Imprimir
Hay que seguir investigando
Saludos
Mustafa
*-------------------------------------------------*
Hi friend Franco
I think the problem is how the
Image captured from "camera.swf"

Look at the file report 00002.jpg
then loaded with Windows Paint and saved
like 00021.jpg.
The Original has neither Compression nor Resolution

This is why it is giving Error when Printing
We have to keep investigating
Regards
Mustafa
Attachments
Info_Image.jpg
Info_Image.jpg (182.87 KiB) Viewed 5492 times
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by franco »

Hi Mustafa, Auge_ohr, It must be something missing in the html command, which I do not understand how it works.
What is DirectShow, I will check out online.
All the best,
Franco
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by AUGE_OHR »

franco wrote: Sat Nov 30, 2019 5:36 pm What is DirectShow, I will check out online.
Directshow is the Way not to use DRM ;)

as i say IMHO Windows 10 does "control" if a CAM can be used.
my Table-PC (Miix 310) have 2 x CAM. i can create CAP Windows an see both Device but Connect fail

Code: Select all

   // need ot4xb
   //
   ::hHwnd := delegated_eval( {|| capCreateCaptureWindowA("CapWindow",;
                                      dwStyle               ,;
                                      0, 0, nWidth, nHeight ,;
                                      ::oBild:getHWND()     ,;
                                      0 ) } )

   // wait for Events ?
*  ::DoEvents()

   If (::hHwnd <> 0)
      //' These calls to SendMessage return integer results but we are ignoring them.
      //' ComboBoxDevices is a DropDownList on the default form, populated by
      //' a call to EnumerateCaptureDevices
      nError := SendMessageA(::hHwnd, WM_CAP_DRIVER_CONNECT, ::nSelect, 0)
      if nError =  0
         MsgBox("can not connect to capture devices"+CRLF+;
                "try disable capture devices and enable it again","Capture Device")
         PostAppEvent(xbeP_Activate,,, ::oStop)
         SetAppFocus(::oStart)
         RETURN
      endif
so the old VFW Way do not work with those "Hello"-CAM which can used as Login instead of PW or PIN.

the Way with SWF file seems to use a HTML file and execute via Browser Engine.

Code: Select all

<html>
	<body style="overflow: hidden; margin: 0; padding: 0;"
		ondragstart="return false;" ondrop="return false;" oncontextmenu="return false;" onmousedown="return false;">
		<PARAM NAME="SCALE" VALUE="exactfit">
		<embed src="CAMERA.SWF" quality="high" type="application/x-shockwave-flash" width="100%" height="100%"
		allowScriptAccess="always" menu="false">
		</body>
</html>
i'm not a HTML Expert but that seem "simple" ... is this "safe" :?:

like ActiveX which Firefox, Chrome and Edge does not support for Security i wonder that Flash still is working this way to get Right of using Hardware. :shock:

Yes, i have Flash installed but as i know Adobe want to cancel Flash.

---

about your CAM and VLC :
when find CAP Device use enhance Option to get into "Driver" Setup
there you find which Resolution of your CAM / Driver support.

VLC will show all Parameter on last line so copy/paste it to your Code.
you can try a *.BAT to call VLC with these Parameter from Command line or use ActiveX

all those Parameter goes to DirectShow "Filter" or "Codec" which are build-in VLC.
if you want to play a MKV Video with WMP (Windows Media Player) it will say "no Codec"
those "Codes" are Part of M$ but you can use Open Source like FFDSHOW to "overrule" M$

so my own Xbase++ "Player" using WMP Engine via ActiveX and FFDSHOW can capture Picture from Directshow

but it is still Xbase++ Code so you can't use it.
there is a VLC Sample in Extendet Version c:\MiniGUI\SAMPLES\Advanced\VLC\myplayer.prg

have fun
have fun
Jimmy
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by franco »

I wonder if it is possible to somehow to implement the code from the MiniGUI Extended Edition of camera.
I have not had time to load or look at any samples from minigui.
Is it possible run any code from minigui in hmg.
All the best,
Franco
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by AUGE_OHR »

franco wrote: Sun Dec 01, 2019 9:36 pm I wonder if it is possible to somehow to implement the code from the MiniGUI Extended Edition of camera.
the MiniGUI Version use the same API as my Xbase++ App so i guess it work with older CAM but not with "Hello" CAM

i found a Dshow Sample in FiveWin but i have to install Visual Studio Express to compile Source :(

---

have you VLC on your PC :?:
this BAT will show Picture from my Capture Card (ati-all-in-Wonder)

Code: Select all

START "TV" "c:\Program Files\VideoLAN\VLC\vlc.exe" -vvv dshow:// :dshow-vdev="ATI T200 AVStream Analog Capture" :dshow-adev="ATI T200 AVStream Analog Audio Capture" :dshow=-size="720x576" :dshow-aspect-ratio=16\:9 :dshow-fps=25 :dshow-video-input=1 :dshow-video-output=-1 :dshow-audio-input=4 :dshow-audio-output=1 :dshow-audio-samplerate=48000 :dshow-audio-bitspersample=16 :live-caching=0 --dshow-tuner-standard=16
as i say line begin with :dshow// will written by VLC into TEXTBOX which you can see when open "Option"
have fun
Jimmy
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by franco »

i had a new thought. Could we use the command in our program execute file "c:\?\camera.?";
If so there could be a field in one of our tables to say where and the name of the camera.
We would want to change the name of the file the camera makes. I have thought on this.
What do you`s think.
Franco
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by AUGE_OHR »

hi,

as i say just copy/paste what you get from VLC in TEXTBOX

have a look here
https://www.vlchelp.com/how-to-record-w ... ia-player/
have fun
Jimmy
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by mustafa »

What if it can serve?

viewtopic.php?f=14&t=4862&hilit=webcam

Webcam_Hmg.zip

The following lines you added to "webcam.prg" must be included Dr. Claudio Soto

viewtopic.php?f=5&t=3464&p=31855&hilit=webcam#p31855

Code: Select all

#include <hmg.ch>
#include <common.ch>


/* Type checking macros */                                                          
#translate ISNIL( <xValue> )       => ( <xValue> == NIL )
#translate ISARRAY( <xValue> )     => HB_ISARRAY( <xValue> )
#translate ISBLOCK( <xValue> )     => HB_ISBLOCK( <xValue> )
#translate ISCHARACTER( <xValue> ) => HB_ISSTRING( <xValue> )
#translate ISDATE( <xValue> )      => HB_ISDATE( <xValue> )
#translate ISLOGICAL( <xValue> )   => HB_ISLOGICAL( <xValue> )
#translate ISMEMO( <xValue> )      => HB_ISMEMO( <xValue> )
#translate ISNUMBER( <xValue> )    => HB_ISNUMERIC( <xValue> )
#translate ISOBJECT( <xValue> )    => HB_ISOBJECT( <xValue> )


#define WS_CHILD     0x40000000
#define WS_VISIBLE   0x10000000



Regards
Mustafa
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: HPDFPRINT IMAGE Image cannot be loaded

Post by franco »

Auge, I just want to take a picture then preview click a save button. It will save to where and new name of what button code says.
my client`s do not know how to run computer only programs.

Mustafa, when I add the code you suggest and build in hmg.3.4.4 , I get the same as Brains error. Just a black box, no picture preview.

All the best ,
Franco
All The Best,
Franco
Canada
Post Reply