| |
|
|
Rainer Hoefs | Hello together, I need time again Help the Community.
unfortunately must I before something ausholen. thereby use I in subesquent these terms:
Teppichdesign = is the Bitmap with the pattern Teppichgröße = The reaele Teppichgröße in cm Druckseite = lt. Profan 680 X 960 spots. (6800 X 9600 intern)
The Pixelmaße the Teppichdesigns (z.B. 771x / 1221y) having nothing with the Teppichgröße To do, The in this example 200 * 300 cm his should the depends simply from the Webmaschine and the Webdichte ex.
I load the Teppichdesign into "hPic.Teppichdesign" and berechne over different Vergleichskriterien between the "Aspectratio.Teppichdesign To Aspectratio.Teppichgröße" The Size of a new "hPic.Teppichgröße" into the "hPic.Teppichdesign" with "DrawSizedPic" hineingeschrieben becomes. thereby becomes fundamentally never The Number of X or Y of Teppichdesign minimizes, separate only a the both Dimensionen, X or Y, vergrößert, so it never To wastage of Bildpunkten, Bildqualität comes. the works everything wonderful. The "hPic.Teppichgröße" has means very the Seitem-Längenverhältnis the Teppichmaße cm.
now would like I The new erstellte Bitmap with the right "Aspectratio.Teppichgröße" on of/ one Druckseite one beliebigen Druckers so print out, thats maximum seitenfüllend under Berücksichtigung the "Aspectratio.Teppichgröße" the paper comes. and very the I get it simply not there.
The procedure, The my Maße for Bitmap with the right Teppichgröße accounts should really too for these Berechnung functions. tappt im dunkeln receiving 4 Parameter, The Teppichbreite cm = "CarpetWidth%", Teppichhöhe cm = "CarpetHeight%", Designbreite pix = "DesignWidth%", Designhöhe pix = "DesignHeight%.
I have already probiert not The Teppichgröße cm x cm separate The 680 X 960 Pixel The Profan using or The internen 6800 X 9600 internen Pixel of Profan einzusetzen.
furthermore have I it with the real possible Druckerpixel per Page probiert The with: HorzSize& = ~GetDeviceCaps(&PDC, ~HORZSIZE) VertSize& = ~GetDeviceCaps(&PDC, ~VERTSIZE) read go.
everything has none success brought. now white I do not More moreover. i hope so to some extent verständlich described to have.
Perhaps knows someone a Solution.
thanks already time in the ahead.
$H windows.ph
Declare solid2Load$, solid2Write$, NewFileName$, Save2FileName$, OriginalDesign&, File2Convert&
Declare PictureWidth%, PictureHeight%, CarpetWidthCM%, CarpetHeightCM%, A%, B%, C%, D%, HorzSize&, VertSize&
Proc CalculatePictureSize
Parameters CarpetWidth%, CarpetHeight%, DesignWidth%, DesignHeight%
Declare DesignAspect!, CarpetAspect!, fashion$
CarpetAspect! = (CarpetWidth% / CarpetHeight%)
DesignAspect! = (DesignWidth% / DesignHeight%)
If CarpetAspect! < 1'high
If DesignAspect! < 1'high
If CarpetAspect! < DesignAspect!
fashion$ = "01"
PictureWidth% = DesignWidth%
PictureHeight% = ((DesignWidth% / CarpetWidth%) * CarpetHeight%)
ElseIf CarpetAspect! = DesignAspect!
fashion$ = "02"
PictureWidth% = DesignWidth%
PictureHeight% = DesignHeight%
ElseIf CarpetAspect! > DesignAspect!
fashion$ = "03"'OK
PictureWidth% = ((DesignHeight% / CarpetHeight%) * CarpetWidth%)
PictureHeight% = DesignHeight%
EndIf
ElseIf DesignAspect! > 1'athwart
If CarpetAspect! < DesignAspect!
fashion$ = "04"
PictureWidth% = DesignWidth%
PictureHeight% = ((DesignWidth% / CarpetWidth%) * CarpetHeight%)
EndIf
EndIf
ElseIf CarpetAspect! = 1'Quadrat
If DesignAspect! < 1'high
fashion$ = "05"
PictureWidth% = DesignHeight%
PictureHeight% = DesignHeight%
ElseIf DesignAspect! = 1'Quadrat
fashion$ = "06"
PictureWidth% = DesignWidth%
PictureHeight% = DesignHeight%
ElseIf DesignAspect! > 1'athwart
fashion$ = "07"
PictureWidth% = DesignWidth%
PictureHeight% = DesignWidth%
EndIf
ElseIf CarpetAspect! > 1'athwart
If DesignAspect! < 1'high
If CarpetAspect! < DesignAspect!
fashion$ = "08"
PictureWidth% = DesignWidth%
PictureHeight% = ((DesignWidth% / CarpetWidth%) * CarpetHeight%)
ElseIf CarpetAspect! = DesignAspect!
fashion$ = "09"
PictureWidth% = DesignWidth%
PictureHeight% = DesignHeight%
ElseIf CarpetAspect! > DesignAspect!
fashion$ = "10"'OK
PictureWidth% = ((DesignHeight% / CarpetHeight%) * CarpetWidth%)
PictureHeight% = DesignHeight%
EndIf
ElseIf DesignAspect! > 1'athwart
If CarpetAspect! < DesignAspect!
fashion$ = "11"
PictureWidth% = DesignWidth%
PictureHeight% = ((DesignWidth% / CarpetWidth%) * CarpetHeight%)
ElseIf CarpetAspect! = DesignAspect!
fashion$ = "12"
PictureWidth% = DesignWidth%
PictureHeight% = DesignHeight%
ElseIf CarpetAspect! > DesignAspect!
fashion$ = "13"
PictureWidth% = ((DesignWidth% / CarpetHeight%) * DesignHeight%)
PictureHeight% = DesignHeight%
EndIf
EndIf
EndIf
ENDPROC
Window 100, 10 - 1700, 1000
Design2Load$ = LoadFile $(%hwnd, "Datei to that konvertieren loading...","Designs|*.APF;*.BMP;*.JPG;*.PNG;*.GIF",0)'solid select
If solid2Load$ <> ""
OriginalDesign& = Create ("HPIC", -1, solid2Load$, 0)'Bitmap with Originaldesign create
DrawPic OriginalDesign&, 1, 1; 0'Originaldesign Show
CarpetWidthCM% = Input$("CarpetWidth cm: ", "100", 1)'Tepichbreite inquire
CarpetHeightCM% = Input$("CarpetHeight cm: ", "100", 1)'Tepichlänge inquire
CalculatePictureSize CarpetWidthCM%, CarpetHeightCM%, %bmpx, %bmpy'new Designgröße to charge
File2Convert& = Create ("hSizedPic",-1, solid2Load$, PictureWidth%, PictureHeight%, 0)'solid in the new Size create
CLS
DrawPic File2Convert&, 1, 1; 0'solid with new Size Show
NewFileName$ = SaveFile$(%hwnd, "Speichere solid as...", "PNG-File (*.PNG)|*.PNG|JPEG-File (*.JPG)|*.JPG|BMP-File (*.BMP)|*.BMP", 1)
If NewFileName$ <> ""
SavePic NewFileName$, File2Convert&'solid with new Size as BMP, PNG, JPG Save
EndIf
If MessageBox ("Soll the solid printed go?", "DRUCKEN", 292) = 6
StartPrint "* " + NewFileName$
If %printing
DrawSizedPic File2Convert&, 0, 0, %bmpx/2, %bmpy/2; 0
EndPrint
EndIf
EndIf
DeleteObject File2Convert&'the Objekt delete
DeleteObject OriginalDesign&'the Objekt delete
EndIf
End
|
|
|
| |
|
|
|
H.Brill | Verwende time Create("hSizedPic",...) with the last Paraemeter mode with 1.
the should still the image under Berücksichtigung the Seitenverhältnisse correctly fitting.
Also would I with the Druckseite yet The Seitenränder take away. there has the Druckertreiber me already Streiche with me made. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 02/24/18 ▲ |
|
|
|
|
Rainer Hoefs | Hello H Brill, The Bitmap The to that printer skillful becomes has already The right Dimensionen loudly TeppichgrößeCM.
These counts it in the Druckbereich of/ one Druckseite correctly. einzupassen.
ought to then your suggestion between Starprint and Endprint occur? On what berechne I then The Output The 680 960 or 6800 9600 or on The over GetDeviceCaps errechneten possible Druckerpixel?
understand it so not really.
MfG |
|
|
| |
|
|
|
H.Brill | Well, if I The 680 through 21 (wide one leaf Papieres) pieces, come I on about 32 Druckerpixel per cm. the same comes too with the Höhe one Blattes out. there would I ca. 35 Pixel per edge take away.
What the Dimensionierung concerns :
Create("hSizedPic",...) power the still for you, alike How big The Bitmap as File is. This will prozentual then eingepaßt. the can you means already at loading the Bitmap . Make
means, i'd there time something differently dran weg. Mach still time one hPic with 680 -70, 960 -70 . the Image malst You on a screen, means Static& = Create("Static",%HWnd, 680, 960) on position 35, 35. means then with StartPaint Static& DrawPic Bitmaphnadle, 35, 35, .... EndPaint on it draw. there it Yes only a Page is, would I the then with WinCopy Static& print.
would be too time a Possibility.
If desired is, the Staticfenster not To see, can one it Yes to the create with ShowWindow hide. and to the pressure simply again DestroyWindow the Static unlock. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 02/24/18 ▲ |
|
|
|