Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-04-2011, 12:08   #61
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
Re: imgkap - kap File Converter Tool

The Windows executable can be downloaded as a single un-zipped object here:

==> imgkap - Download

It also has the imgkap.c source code.

This site will be updated sometime from a coupla hours to as much as a coupla days after a new version is posted here.

If you want the newest version right away, download the attachments posted in the post above and follow the instructions.

BUT, if you want it to be a little easier, you can download 7-Zip, and yuse the convert.cmd at the link above that will rename, combine and un-zip all at once. Just put the downloaded objects in the same directory as the convert.cmd and double-click the command.

When I get home tonight, I'll modify the page to show the date/time and link to the post of the version that was last downloaded, so it'll be obvious which one it is.

-dan
__________________

dacust is offline   Reply With Quote
Old 11-04-2011, 12:17   #62
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 61
Re: imgkap - kap File Converter Tool

Thank you very much Dan
__________________

__________________
MdJ is offline   Reply With Quote
Old 11-04-2011, 12:41   #63
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
Re: imgkap - kap File Converter Tool

Quote:
Originally Posted by MdJ View Post
Thank you very much Dan
YOU are the one deserving thanks. All I did was spend a few minutes in notepad putting up a rudimentary web page. You've spent hours developing a tool for others to use.

Thanks!

-dan
dacust is offline   Reply With Quote
Old 13-04-2011, 09:08   #64
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: NEW imgkap - kap File Converter Tool

M'dJ!
WOW! this works great!
It produces a really nice Google Earth chart from the png very quick-
I didn't have to fool around in irfanview at all!

I used the kml feature and MOBileAtlasCreator...two ways to do this:either open the MOBAC kmz in Google earth,resave it and then it's just

>imgkap nameofit.kml (and that's all!wow!)

or,with the unzipped kml that MOBAC has as "doc.kml"...I found I had to edit the kml from "<href>files/cove_15.jpg</href>" to "<href>cove_15.jpg</href>" .I wish MOBAC didn't do this...

>imgkap doc.kml

wow.
PS thanks for the "-t" option...!that fixes this tiny complaint..Imgkap - kap File Converter Tool

__________________
HappySeagull is offline   Reply With Quote
Old 13-04-2011, 11:18   #65
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
MOBAC CRIPPLED!

MOBAC has just been crippled(March2011)
!The "new" version no longer has Google Earth!just OpenStreetMaps...If you have the old Version hang on to it!
__________________
HappySeagull is offline   Reply With Quote
Old 13-04-2011, 12:24   #66
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 61
Re: MOBAC CRIPPLED!

Quote:
Originally Posted by HappySeagull View Post
MOBAC has just been crippled(March2011)
!The "new" version no longer has Google Earth!just OpenStreetMaps...If you have the old Version hang on to it!
Hello HeappySeagull,

You can find the previous version on internet, searching for: Atlas Mobile Creator 1.8.zip

When I generate a file with MOBAC 1.8 for Google Earth Overlay (KMZ) (often Linux), unzip KMZ files creates 2 files doc.kml and files/xxxxxx.jpg

> imgkap doc.kml

create files/xxxxxx.kap

M'dJ
__________________
MdJ is offline   Reply With Quote
Old 13-04-2011, 16:48   #67
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: MOBAC CRIPPLED!

Quote:
Originally Posted by MdJ View Post
Hello HeappySeagull,

You can find the previous version on internet, searching for: Atlas Mobile Creator 1.8.zip

When I generate a file with MOBAC 1.8 for Google Earth Overlay (KMZ) (often Linux), unzip KMZ files creates 2 files doc.kml and files/xxxxxx.jpg

> imgkap doc.kml

create files/xxxxxx.kap

M'dJ
M'dJ,Good!thanks for that link for MOBAC!(Take note those that don't already have this useful tool.Get it now,before it disappears.No need to install...)

as to me saying,
" I found I had to edit the kml from "<href>files/cove_15.jpg</href>" to "<href>cove_15.jpg</href>" ...

I should do as you have it?
quote:

>imgkap doc.kml

[new line?]create files/xxxetc.kap

???
__________________
HappySeagull is offline   Reply With Quote
Old 13-04-2011, 18:11   #68
Registered User
 
Surveyor's Avatar

Join Date: Mar 2010
Location: Ft. Pierce, FL - Bislig, Philippines - Gladstone QLD
Boat: 1968 Alberg 30 #329
Posts: 451
Re: imgkap - kap File Converter Tool

THIS NEW VERSION IS HAWT!!!!!

Thank you very very much for sharing!
__________________
Jim - Bahala na!
http://svcookie.blogspot.com/
KK4GGF
Surveyor is offline   Reply With Quote
Old 14-04-2011, 00:14   #69
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 61
Re: MOBAC CRIPPLED!

Sample image of Liberty Island in New York :

1) unzip with 7-Zip or other software "Liberty New York.kmz"
unzip create 2 files doc.kml and files/xxxxxxx.jpg

2) execute in MS-DOS or shell on Linux, Unix...
> imgkap doc.kml -t "Liberty Island" LibertyIsland.kap

to create kap file

3) execute
> imgkap LibertyIsland.kap LibertyIsland.png

to recover image


See attached files

You can notice that the png file has 128 colors and a different size.

(imgkap uses the coordinates of the kml and recalculates the size of the image to make a good image in the Mercator projection and of course the colors are reduced to 128 maximum.)

M'dJ
Attached Thumbnails
Click image for larger version

Name:	LibertyIsland.png
Views:	171
Size:	238.4 KB
ID:	26135  
Attached Files
File Type: kmz Liberty New York.kmz (151.5 KB, 67 views)
File Type: doc LibertyIsland.kap.doc (363.8 KB, 70 views)
__________________
MdJ is offline   Reply With Quote
Old 14-04-2011, 08:18   #70
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

AH! M'dJ!Merci...
I found my mistake! When I unzipped the kmz,I didn't include the folder called "files"! I took the image OUT of the folder.a mistake.
__________________
HappySeagull is offline   Reply With Quote
Old 14-04-2011, 08:46   #71
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

I do it a little differently.In MobileAtlasCreator,I name the kmz..this example is called KooryetBay.

KooryetBay.kmz

and when unzipped,it makes the doc.kml and the folder called "files"
but at the cmd line,I do only this:

>imgkap doc.kml

and that's all! and it puts "KooryetBay_14.kap" in that folder named "files" where the unzipped image file from the kmz was. "KooryetBay_14.jpg".

The "_14" was added by MOBAC,being the scale I had chosen.

Oh!This works great,however,M'dJ! It's been a whole day WITHOUT irfanview!hurray!
__________________
HappySeagull is offline   Reply With Quote
Old 14-04-2011, 10:14   #72
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap Fun with IMGKAP !

this is a bit of a reprise from the tiff2kap thread but is very cool and bears repeating?It's fun!

I love that I can do this with IMGKAP...
extract the chart,edit it and rebuild it.I wrote some simple scripts to do it quickly...
imgkap_Extract2Edit.doc
imgkap_AUTO_Rebuild.doc
You can read these in notepad and edit them too.Basically,they're Dacust's! but don't blame him!
to use em,rename them to ".bat",put them with a copy of imgkap in a folder with the chart kap you want to edit.That's easiest.And all you need!
Double click the "extract to edit" script,follow it's directions which is just to type the name of the chart you want to edit (I used M'dJ'sLiberty kap from post above here)and then,two files are extracted,both with "EX" in their name.The headerEX is just a text file,despite the ".kap".You can edit it but not in this example.Fool with it later...
Edit the EX.tif as you please in in an image editor,and then double click "AUTO rebuild" script which will recombine the two files as a kap using the original name adding "EX" to it so it won't get confused or overwrite the original.

using em,I made this from M'dJ's Liberty Island kap while making coffee.
LibertyIslandEX.kap.doc

Click image for larger version

Name:	LibertyIslandEX.jpg
Views:	148
Size:	71.0 KB
ID:	26156
but it works very well with any chart I've tried....In fact,when OpenCPN wouldn't open a Transverse Mercator,I ripped the chart open,rebuilt it and put it back in less than 30 seconds.In that instance,I edited the header...but that subject is well-covered elsewhere.Seems pretty handy!
Thanks again M'dJ for this very cool tool
__________________
HappySeagull is offline   Reply With Quote
Old 14-04-2011, 13:59   #73
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 61
Re: imgkap Fun with IMGKAP !

Quote:
Originally Posted by HappySeagull;666761
Thanks again M'dJ for this very [I
cool[/I] tool
Thank you HeapySeagfull

I have a small sailboat; Etap 22i and I spent one month all summers in France, Spain...

On my boat, I put a small solar panel, I bought a computer EEEPC and downloaded world maps and SHOM (Do not repeat...).

I also wanted the satellite maps and tried libbsb but I found many bugs. I am a computer professional, I worked in the past, in assembler on FAX and others in the laboratory.

So I remade the code and last summer I traveled on the Atlantic coast with these cards and no problems.

Thank you again, I just want you to enjoy what I use for me.

M'dJ
__________________
MdJ is offline   Reply With Quote
Old 15-04-2011, 03:38   #74
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 61
Raster - Question about the color reduction "Quantize"

This question has been addressed in other threads, but it seems useful that I clarify the solutions and results.

Globaly, there are 2 methods to reduce colors.
  • The first is to make a frame, for example a gray is represented by a mixture of black and white.
    This method is used eg for printing, printers have just black and 3 or 4 colors.

    It works perfectly when the resolution is important, for example with a paper chart, but for zoom camera image this method is not correct.

    This method is used by default in ImageMagick or irfanview.
  • The second method is to find the colors in the image and reduce the number of colors desired.
    This method gives a loss of information or color accuracy, but it is effective for photos and satellite images.

    There are many more or less intelligent algorithm processing, which uses more or less time.

    In imgkap, the idea being to combine the color closest in the RGB cube.

    This same method is done with ImageMagick option or in irfanview option or by default in Gimp.

    The pictures much more advanced treatments may not do the math in RGB space, but in the HSL space or more.
    Because the color is not an RGB, but a light wave, which only a portion is visible to the human eye.
    In these advanced treatments, the reduction is done by taking into account these aspects.

Ci-dessous, Sample trame d'imprimerie and RGB cube.

(If necessary Imgkap reduced to 128 colors (not 127), the kap contains 128 colors and is working properly.
I have compared the results of imgkap with Gimp and zoom in IrfanView.)

M'dJ
Attached Thumbnails
Click image for larger version

Name:	distort-taj-newsprint.jpg
Views:	146
Size:	92.7 KB
ID:	26174  
Attached Images
 
__________________
MdJ is offline   Reply With Quote
Old 15-04-2011, 10:05   #75
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

M'dJ,
I've been doing some comparisons,oldimgkap and NEW imgkap...
Here are some palettes from EXtracted tifs of two charts I made,so these are what the resulting kap looks like.
The first I made the png into a 128 colour tif before making it into a chart.The second is what your new,improved IMGKAP does automatically!
Click image for larger version

Name:	Palette irfanview.jpg
Views:	151
Size:	224.8 KB
ID:	26180Click image for larger version

Name:	Palette imgkap.jpg
Views:	136
Size:	215.0 KB
ID:	26181

Both are from the same 24bpp,16mill colour "png"....so,I can shut up now about converting,eh?



And in case anyone doesn't know what this is about...
here's what M'dJ has fixed in the conversion processor he started with.It didn't happen all the time...and simple charts were fine.But....
Click image for larger version

Name:	oldScotland 10EX.jpg
Views:	131
Size:	364.9 KB
ID:	26183
kind of interesting and still navigable
now,of course it'sClick image for larger version

Name:	<a title=Scotland 10EX.jpg Views: 139 Size: 297.3 KB ID: 26182" style="margin: 2px" />
__________________

__________________
HappySeagull is offline   Reply With Quote
Reply

Tags
imgkap

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Development Debugging Environment - Setup Help rgleason OpenCPN 577 11-11-2017 06:02
OpenCPN Beta Version 3.1.814 Released bdbcat OpenCPN 185 14-09-2012 08:43
Route File Transfer via SDcard to Garmin 441s four winds Navigation 11 25-02-2012 09:34
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 22:33
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 05:31



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 22:28.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.