THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700
rod@welchco.com
S U M M A R Y
DIARY: January 4, 2019 04:40 PM Friday;
Rod Welch
SDS upgrade 0704050 transfer picture dimensions converting SDS records to HTML displayed on Internet.
1...Summary/Objective
..............
Click here to comment!
CONTACTS
SUBJECTS
Convert SDS Records HTML Internet Display Macro File 070405 Add HTTP
2303 -
2303 - ..
2304 - Summary/Objective
2305 -
230501 - Follow up ref SDS 9 0000. ref SDS 3 0000.
230502 -
230503 -
230504 -
230505 -
230507 - ..
2306 -
2307 -
2308 - Progress
2309 -
230901 - On 171225 1409 Upgraded code in 070405 that converts SDS records and
230902 - files into HTML code for display on the Internet, so it processes
230903 - references to external sources with https url address. ref SDS 9 WJ5I
230905 - ..
230906 - Past few days have finally entered the record hiking Half Dome on
230907 - 160914 0530. ref SDS 7 0001 Today, completed record hiking Half Dome
230908 - last year on 180912 0545. ref SDS 10 0001
230910 - ..
230911 - Pictures display pretty well on the Internet for the record on 160914
230912 - 0530. ref SDS 7 0001 However, the pictures do not display well, and
230913 - actually are horrible for the hike on 180912 0545. ref SDS 10 0001
230915 - ..
230916 - Here is the problem....
230917 -
230918 - Pictures for hike on 160914 0530, ref SDS 7 0001, were taken with
230919 - Samsung S5 which had less resolution...
230920 -
230921 - 3264 x 1836 pixels
230923 - ..
230924 - Pictures for hike on 180912 0545. ref SDS 10 0001 were taken with
230925 - Samsung S8 shich has higher resolution...
230926 -
230927 - 4032 x 1960 pixels
230929 - ..
230930 - We need a way to transfer picture dimensions entered in an SDS record
230931 - to macro 070405 for specifying appropriate display.
230933 - ..
230934 - Experimenting with HTML code indicates the best way to manage this
230935 - issue is to recognize the approximate width to height ratios produced
230936 - by the camera, and apply this as percentages in the pix command. The
230937 - browser will then determine how to display the image.
230939 - ..
230940 - For example in this case "4032" is actually the height and "1960" is
230941 - the height. The best image is displayed as
230942 -
230943 - width = 40% and height = 80%
230945 - ..
230946 - In other words, tell the browser to display the picture smaller than
230947 - the actual image, and made the width half the size of the height.
230949 - ..
230950 - We can set default image command, and apply custom spec if the
230951 - picture is horizontal rather than vertical.
230953 - ..
230954 - Background on 070405 is reported on 131005 1700. ref SDS 2 VP5N
230956 - ..
230957 - Typical entry for a picture in an SDS record is...
230958 -
230959 -
230961 - ..
230962 - May be able to add feature that does not display on the Internet like
230963 - this...
230964 -
230966 -
230968 - ..
230969 - Currently this doesn't work, i.e., pressing Enter does not open the
230970 - picture, because the code expects to find a blank above a picture.
230971 -
230972 -
230973 - 4032 1836
230975 - ..
230976 - This doesn't work either.
230978 - ..
230979 - Have to modify macro 36 in 000008, so when pix:nnn is encountered, the
230980 - code will process this as a blank line, and then display the picture.
230982 - ..
230983 - Then have to modify 070405, so it will post pixels to the code to the
230984 - HTML code that displays pictures.
230985 -
230986 -
230987 -
230988 -
230990 - ..
230991 - Line 1430, ref OF 5 PJ9M, -entry 136 in \SD\33\000008 about 12 lines below
230992 -
230994 - ..
230995 - Line 1620, ref OF 5 CQ6F, -label ekopgfg in \SD\33\000008 about 101 lines below
230996 -
230997 - macro 1363
230998 -
230999 - Code calls macro 1363 to see if the line is blank, or contains
231000 - a string with an extension which identifies a file that can be
231001 - opened by another application.
231002 -
231004 - ..
231005 - This macro can evaluate counter 422 > 22 < 27, to identify when the
231006 - line is a picture specification to open.
231007 -
231008 -
231009 - -if @0 = 0 -goto n472SD
231010 - -if @47 = 2 tl 4
231011 - eol
231012 - @c:\sd\33\00903
231013 - -if @1 = 1 -goto n472SD
231014 - -exit
231015 -
231016 - If 00903 discovers lines above and below the target line are
231017 - blank, so assume this is a valid call to open a file for
231018 - another application.
231019 -
231020 -
231022 - ..
231023 - Line 90, ref OF 3 T54H, -label start in \01\14\009030 about 19 lines below
231024 -
231025 -
231026 -
231028 - ..
231029 - Line 300, ref OF 3 HN9J, -label scstp in \01\14\009030 about 21 lines below
231030 -
231031 - rel_cur -1 0
231032 - setlen 1 0
231033 - chrcnt 3 0
231034 - rel_cur 2 0
231035 - setlen 2 0
231036 - rel_cur -1 0
231037 - -label scstp
231038 - setcur 71 0
231039 - -if @2 > 9 -goto tlpn
231040 - -if @1 < 10 -goto pltop
231041 - subcnt 1 @71
231042 - -if @3 = 60 -if @1 < 6 -goto pltop
231043 -
231044 - Code has checked lines above and below target line.
231045 -
231046 - pushc
231047 - rel_cur -1 -1
231048 - z 10 90
231049 - errorcnt 0 0
231050 - fr /pix:/
231051 - popc
231052 - -if @0 = 0 -goto pltop
231053 -
231054 -
231055 -
231057 - ..
231058 - Line 4350, ref OF 4 HR7H, -label lppics in \01\14\0704050 about 9 lines below
231059 -
231060 - -label lppics
231061 - debug 100
231062 - setcnt 0 0
231063 - setcnt 511 0
231064 -
231065 - -if @0 > 0 -goto JPg................. ref SDS 0 C67K
231066 - c !\!/!1 *
231067 - -goto 4udf............................ ref SDS 0 XV9K
231068 -
231069 - Loop process picture file specs with lower case jpg file
231070 - extensions, and change DOS file path delimiters to HTML
231071 - forwart slash delimiters. If search finds no lower case jpg
231072 - files, then look for upper case JPGs. If lower case jpg files
231073 - found, then branch to apply html code for display in browsers.
231074 -
231075 -
231076 -
231078 - ..
231079 - Line 4380, ref OF 4 2Y8O, -label lpJpG in \01\14\0704050 about 5 lines below
231080 -
231081 - -label JPg
231082 - debug 100
231083 - top
231084 - setcnt 0 0
231085 - setcnt 796 7961
231086 - -label lpJpG
231087 -
231088 - -if @0 > 0 -goto b8l .....................
231089 - c !\!/!1 *
231091 - ..
231092 - Set flag processing upper case JPG files; if none found,
231093 - branch to next process.
231094 -
231095 -
231096 -
231097 -
231099 - ..
231100 - -label 4udf
231101 - loc_cur 3 1
231102 - aw
231103 - aw
231104 - setcur 511 0
231105 - addcnt 511 1
231106 - down
231107 - errorcnt 0 0
231108 - fr/ix:/
231109 -
231110 - Put cursor on col 1, then move it to target line col. Get
231111 - target line col position. Move file down so cursor is on col
231112 - above to evaluate for pixel spec. Find right string to
231113 - evaluate for pixel spec to modify img command.
231114 -
231115 -
231116 - setcnt 501 400
231117 - setcnt 502 600
231118 - setcnt 504 0
231119 - -if @0 > 0 setcnt 504 1
231120 - -if @504 = 1 -goto nPix...................
231121 - chrcnt 5 0
231122 - -if @5 > 32 -goto rdPix................... ref SDS 0 166N
231123 - rel_cur 0 1
231124 -
231125 - Set default width and height size assume vertical picture.
231126 - Use counter 504 to store condition of pixel spec entered in
231127 - SDS record. Read char above picture file spec, if not blank
231128 - it means a spec was entered, so branch to reat it. Otherwise
231129 -
231130 -
231132 - ..
231133 - -label rdPix
231134 - capture width param only 2 positions for 2 digit
231135 - percent, per above.
231136 -
231137 -
231138 - strcnt 501 3
231139 - capture height param
231140 -
231141 - aw
231142 - strcnt 502 3
231143 -
231144 - remove spec line
231145 - immed d
231146 -
231147 -
231148 -
231149 -
231150 -
231151 - -label nPix
231152 - -if @504 = 1 up
231154 - ..
231155 - If height greater than width don't shift position
231156 -
231157 -
231158 - -if @501 < @502 -goto lpatl
231159 -
231160 - Width is less than height, so...
231162 - ..
231163 - Move image to col 12, so it is better centered in the
231164 - html web browser.
231165 -
231166 - loc_cur 0 12
231167 - macro 79
231168 -
231169 - setcnt 511 12
231170 -
231171 -
231172 - -label lpatl
231173 -
231174 -
231175 - loc_cur 0 @511
231176 -
231177 - split
231178 -
231179 -
231180 - ins_text !<img width="520" height="720" src="file://!
231181 -
231182 - ins_text !<img width="400" height="650" src="file://!
231183 -
231184 - If no pixel spec, then use default.
231185 -
231186 - -if @504 = 1 -goto imgov
231187 -
231188 - enter width spec
231189 -
231190 - fr /width="/
231191 -
231192 - inscnt 501 0
231193 - enter height spec
231194 -
231195 - ins_text /" height=" /
231196 - eol
231197 - inscnt 502 0
231198 - ins_text !" src="file://!
231199 -
231200 - -label imgov
231201 - reset error count
231202 - setcnt 0 0
231203 -
231204 - eol
231205 - join
231206 - Add final delimiter "/"
231207 -
231208 - ic 47
231209 - force drive letter lower case "c"
231211 - ..
231212 - Need this to uniformly convert local address to URL
231213 - address on Internet, below at anchor 4260
231214 -
231215 -
231216 - ic 99
231218 - ..
231219 -
231220 - eol
231221 - ic 34
231222 - ic 62
231223 -
231224 - of 0
231225 -
231226 - If processing capitals do JPG loop
231227 -
231228 - -if @796 = 7961 -goto lpJpG
231229 - Otherwise do lower case jpg loop
231230 - -goto lppics
231231 -
231232 -
231233 -
231234 -
231235 -
231236 -
231237 -
231238 -
231239 -
231240 -
231241 -
231242 -
231243 -
231244 -
231245 -
231246 -
231247 -
231248 -
231249 -
231250 -
231251 -
231252 -
231253 -
231254 -
231255 -
231256 -
231257 -
231258 -
231259 -
231260 -
231261 -
231262 -
231263 -
231264 -
231265 -
231266 -
231267 -
231268 -
231269 -
231270 -
231271 -
231272 -
231273 -
231274 -
231275 -
231276 -
231277 -
231278 -
231279 -
231280 -
231281 -
231282 -
231283 -
231284 -
231285 -
231286 -
231287 -
231288 -
231289 -
231290 -
231291 -
231292 -
231293 -
231294 -
231295 -
231296 -
231297 -
231298 -
231299 -
231300 -
231301 -
231302 -
231303 -
231304 -
231305 -
231306 -
231307 -
231308 -
231309 -
231310 -
231311 -
231312 -
231313 -
231314 -
231315 -
231316 -
231317 -
231318 -
231319 -
231320 -
231321 -
231322 -
231323 -
231324 -
231325 -
231326 -
231327 -
231328 -
231329 -
231330 -
231331 -
231332 -
231333 -
231334 -
231335 -
231336 -
231337 -
231338 -
231339 -
231340 -
231341 -
231342 -
231343 -
231344 -
231345 -
231346 -
231347 -
231348 -
231349 -
231350 -
231351 -
231352 -
231353 -
231354 -
231355 -
231356 -
231357 -
231358 -
231359 -
231360 -
231361 -
231362 -
231363 -
231364 -
231365 -
231366 -
231367 -
231368 -
231369 -
231370 -
231371 -
231372 -
231373 -
231374 -
231375 -
231376 -
231377 -
231378 -
231379 -
231380 -
231381 -
231382 -
231383 -
231384 -
231385 -
231386 -
231387 -
231388 -
231389 -
231390 -
231391 -
231392 -
231393 -
231394 -
231395 -
231396 -
231397 -
231398 -
231399 -
231400 -
231401 -
231402 -
231403 -
231404 -
231405 -
231406 -
231407 -
231408 -
231409 -
231410 -
231411 -
231412 -
231413 -
231414 -
231415 -
231416 -
231417 -
231418 -
231419 -
231420 -
231421 -
231422 -
231423 -
231424 -
231425 -
231426 -
231427 -
231428 -
231429 -
231430 -
231431 -
231432 -
231433 -
231434 -
231435 -
231436 -
231437 -
231438 -
231439 -
231440 -
231441 -
231442 -
231443 -
231444 -
231445 -
231446 -
231447 -
231448 -
231449 -
231450 -
231451 -
231452 -
231453 -
231454 -
231455 -
231456 -
231457 -
231458 -
231459 -
231460 -
231461 -
231462 -
231463 -
231464 -
231465 -
231466 -
231467 -
231468 -
231469 -
231470 -
231471 -
231472 -
231473 -
231474 -
231475 -
231476 -
231477 -
231478 -
231479 -
231480 -
231482 - ..
231483 - Line 1680, ref OF 5 SH6I, -entry 1363 in \SD\33\000008 about 10 lines below
231484 -
231485 - -entry 1363
231486 - tl 0
231487 - errorcnt 0 0
231488 - setcnt 422 0
231489 - loc_cur 0 1
231490 - z 1 400
231491 - fr /http/
231492 - addcnt 422 1
231493 - fr /HTTP/
231494 - addcnt 422 1
231495 -
231496 -
231497 -
231498 -
231499 -
231500 -
231501 -
231502 -
231503 -
231504 -
231505 -
231506 -
231507 -
231508 -
231509 -
231510 -
231511 -
231512 -
231513 -
231514 -
231515 -
231516 -
231517 -
231518 -
231519 -
231520 -
231521 -
231522 -
231523 -
231524 -
231525 -
231526 -
231527 -
231528 -
231529 -
231530 -
231531 -
231532 -
231533 -
231534 -
231535 -
231536 -
231537 -
231538 -
231539 -
231540 -
231541 -
231542 -
231543 -
231544 -
231545 -
231546 -
231547 -
231548 -
231549 -
231550 -
231551 -
231552 -
231553 -
231554 -
231555 -
231556 -
231557 -
231558 -
231559 -
231560 -
231561 -
231562 -
231563 -
231564 -
231565 -
231566 -
231567 -
231568 -
231569 -
231570 -
231571 -
231572 -
231573 -
231574 -
231575 -
231576 -
231577 -
231578 -
231579 -
231580 -
231581 -
231582 -
231583 -
231584 -
231585 -
231586 -
231587 -
231588 -
231589 -
231590 -
231591 -
231592 -
231593 -
231594 -
231595 -
231596 -
231597 -
231598 -
231599 -
231600 -
231601 -
231602 -
231603 -
231604 -
231605 -
231606 -
231607 -
231608 -
231609 -
231610 -
231611 -
231612 -
231613 -
231614 -
231615 -
231616 -
231617 -
231618 -
2317 -