mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
this happens on some images while others are fine sometimes I will get a large part of the draw cut off.

Note: Im working only with .jpg format.

my little script gets the proper height/width values as shown if i would look at the images properties or have it open in photoshop however, the fact remains that some images are cut off while some are not

Here is my syntax. a shortform of my dialog as been included of what i use to trigger open pic with

Code:
dialog Pic {
  title "Picture"
  size -1 -1 57 22
  option dbu
  button "Open Pic", 1, 9 4 37 12
}

on *:dialog:pic:sclick:1:{
  %pic.filepath = $sfile(*.jpg)
  %pic.w = $pic(%pic.filepath).width
  %pic.h = $pic(%pic.filepath).height
  /window -apd @pictures -1 -1 %pic.w %pic.h
  drawpic -ms @pictures -1 -1 %pic.w %pic.h $qt(%pic.filepath)
}


Note: while I can keep the vars local I choosed to make them global for now to make sure I see whats written to the var and so far so good all proper values are in. Issue still there.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
Are you creating the jpg's? Are they in the same compression format? Quality Colors etc....


We don't just write the scripts, we put them to the test! (ScriptBusters)
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
No its just random images being picked up to view at see what I did is create a script that when a *.jpg file is sent to me it will execute it automatically in its own picture window @picture not always being static.

Now when I receive the files some will open Automatically at the correct size while others are not registring height and width properties correctly.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Its fixed I thought the new mIRC didnt require +d in the call to the picture window

so /window -phd +d @windowname blah blah works..


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
dialog Pic {
title "Picture"
size -1 -1 57 22
option dbu
button "Open Pic", 1, 9 4 37 12
}

on *:dialog:pic:sclick:1:{
%pic.filepath = $qt($sfile(*.jpg))
%pic.w = $pic(%pic.filepath).width
%pic.h = $pic(%pic.filepath).height
/window -apdf @pictures -1 -1 %pic.w %pic.h
drawpic -ms @pictures -1 -1 %pic.w %pic.h %pic.filepath
}

just added the -f switch which means the size is the client size (for text) not the window (with frame) size


Link Copied to Clipboard