10月 31st, 2006

EPSぜ BoundingBox

Posted in Web/AP全舜 by tatenaga

 EPSに代表されるPostScriptファイルでは、ファイル先頭のヘッダ領域ぜ “BoundingBox”と呼ばれる座木 情報を保持している。これを利用しぜ ImageMagick等のライブラリを使用しなぜ ても画? ファイルサイズを圏 得することが可能となる。

 方? としては、文字列「%%BoundingBox:」を検索し、後に? ぜ “左? X座木 左? Y座木 右? X座木 右? Y座木 “の値を圏 得して? き算すれば良い。ただし、単位はポイントとなっているので、必要に? じてミリメートル、ピクセル? の単位に? 朏 する必要がある。また、ヘッダ領域の情報に「%% BoundingBox: (atend)」と? 義されている場合、画? データ最下部にフッタ領域に座標情報が付加されているので注? が必要となる。

st_fp = fopen( chp_file, "rb" );

for ( ;; ){
	chp_fgets = fgets( cha_line, sizeof(cha_line), st_fp);

	// fgetsエラボ /ファイル? 了
	if (chp_fgets == NULL){
		break;
	}
	// 空? を無?
	if ( strlen(cha_line) == 0 ){
	continue;
	}
	// コメント以? は無?
	if ( cha_line[0] != '%' ){
		continue;
	}
	// 「BoundingBox: (atend)」 の場合は無?
	if ( strstr( cha_line, "atend" ) != NULL ){
		continue;
	}
	// BoundingBoxなしは無?
	chp_str = strstr( cha_line, "%%BoundingBox:" );
	if ( chp_str == NULL ){
		continue;
	} else {
		// BoundingBox該?
		in_cnt = sscanf( chp_str, "%s %d %d %d %d", cha_box, &in_x1, &in_y1, &in_x2, &in_y2 );
		if ( in_cnt != 5 ){
			continue;
		}
		break;
	}
}

in_ret = fclose( st_fp );

1pt=1/72inch
1inch=25.4mm
1pt=0.352777778mm

You can leave a comment, or trackback from your own site. RSS 2.0

35 comments

  1. yeezy boost says:

    I would like to express my passion for your kind-heartedness for those people that require guidance on this important study. Your personal commitment to getting the message along came to be exceptionally powerful and have without exception helped ladies just like me to arrive at their targets. Your amazing informative guidelines implies much to me and extremely more to my mates. Thanks a ton; from all of us.

    1月 9th, 2019 at 15:38:38

  2. golden goose sneakers says:

    I not to mention my buddies have been reading through the good information located on the blog then suddenly developed an awful suspicion I never thanked the site owner for those secrets. These people appeared to be as a result very interested to read through all of them and have now really been taking advantage of these things. Thanks for really being really accommodating and for deciding on this kind of awesome themes most people are really wanting to understand about. My very own honest apologies for not expressing appreciation to you earlier.

    1月 10th, 2019 at 5:54:28

  3. birkin bag says:

    I would like to show some appreciation to this writer just for rescuing me from this particular situation. As a result of surfing throughout the search engines and meeting ways that were not beneficial, I figured my life was done. Being alive devoid of the strategies to the problems you have resolved as a result of your post is a critical case, and those that might have adversely damaged my career if I hadn’t discovered your blog. Your personal expertise and kindness in touching every aspect was very useful. I don’t know what I would’ve done if I hadn’t encountered such a thing like this. I’m able to at this point look ahead to my future. Thanks a lot so much for your high quality and results-oriented help. I will not be reluctant to suggest your web sites to anyone who needs and wants recommendations about this matter.

    1月 11th, 2019 at 1:05:01

  4. pandora bracelet says:

    I truly wanted to construct a message to be able to thank you for these nice solutions you are writing on this website. My rather long internet lookup has at the end been recognized with brilliant information to talk about with my co-workers. I would say that many of us website visitors actually are undeniably blessed to exist in a really good community with many wonderful individuals with insightful solutions. I feel truly privileged to have seen the website page and look forward to tons of more amazing moments reading here. Thanks again for a lot of things.

    1月 11th, 2019 at 18:18:02

  5. hermes bag says:

    I would like to express my gratitude for your kindness in support of folks that need help with this one area of interest. Your special dedication to getting the message across became particularly powerful and has continuously helped those like me to attain their desired goals. The invaluable guidelines indicates a lot to me and somewhat more to my colleagues. Warm regards; from all of us.

    1月 12th, 2019 at 12:03:06

  6. golden goose sneakers says:

    I intended to put you a little word to finally thank you so much yet again about the remarkable views you have featured on this page. This has been certainly pretty open-handed of people like you to allow openly all that numerous people would have supplied as an ebook to help with making some dough on their own, certainly since you could have tried it if you desired. Those solutions additionally worked like the good way to understand that many people have a similar keenness really like my very own to understand great deal more with regards to this matter. I think there are numerous more pleasant times up front for folks who look over your website.

    1月 12th, 2019 at 21:04:33

  7. curry 4 says:

    My spouse and i got so comfortable that John could carry out his web research via the precious recommendations he came across from your own site. It is now and again perplexing to just be giving freely helpful tips which most people might have been making money from. And now we discover we now have you to appreciate for this. All the illustrations you made, the easy site navigation, the relationships you aid to foster – it’s got most amazing, and it is aiding our son and the family reckon that this concept is enjoyable, and that is extraordinarily indispensable. Many thanks for everything!

    1月 13th, 2019 at 8:24:15

  8. bape hoodie says:

    I needed to create you that very small observation to help thank you so much over again relating to the precious ideas you’ve documented at this time. It was simply strangely open-handed of you to deliver openly what exactly a number of people might have marketed for an ebook to help make some dough for themselves, most importantly since you could have done it in case you decided. Those thoughts additionally served to provide a great way to fully grasp other people have a similar desire just like my own to see very much more when considering this matter. I think there are some more fun times in the future for individuals who read your website.

    1月 14th, 2019 at 4:44:23

  9. cheap basketball shoes says:

    I am also writing to let you know of the wonderful encounter my daughter undergone browsing your blog. She came to find numerous issues, which included what it is like to possess a great teaching heart to get the mediocre ones completely understand specified tricky subject matter. You undoubtedly did more than her desires. Thanks for offering these insightful, healthy, explanatory and even easy guidance on your topic to Kate.

    1月 14th, 2019 at 17:46:32

  10. yeezy 700 says:

    I must show my respect for your kind-heartedness for those who have the need for assistance with this particular concern. Your very own commitment to passing the solution all around had become unbelievably beneficial and has surely encouraged those just like me to realize their ambitions. Your entire important advice means so much to me and substantially more to my fellow workers. Regards; from everyone of us.

    1月 15th, 2019 at 4:25:52

  11. nike vapormax says:

    I enjoy you because of all of your efforts on this web site. Betty enjoys engaging in internet research and it’s really easy to understand why. Almost all notice all concerning the lively way you provide priceless suggestions on the web blog and as well as increase participation from other ones on this concern so my daughter has been being taught a great deal. Enjoy the rest of the new year. You are carrying out a pretty cool job.

    1月 15th, 2019 at 12:04:10

  12. ferragamo belts says:

    I wanted to compose a quick word to appreciate you for some of the unique ways you are writing at this website. My extended internet search has now been rewarded with reputable know-how to talk about with my partners. I would repeat that most of us readers actually are unquestionably lucky to live in a great community with so many lovely people with interesting concepts. I feel extremely grateful to have come across your web site and look forward to so many more cool times reading here. Thanks once more for a lot of things.

    1月 15th, 2019 at 21:30:19

  13. ultra boost says:

    I really wanted to write a remark to be able to say thanks to you for some of the nice techniques you are posting here. My time intensive internet investigation has now been recognized with extremely good tips to go over with my companions. I would say that we visitors are unquestionably endowed to dwell in a magnificent site with many wonderful professionals with beneficial secrets. I feel extremely privileged to have discovered your entire webpages and look forward to some more amazing times reading here. Thanks once more for everything.

    1月 16th, 2019 at 2:42:45

  14. kobe 9 says:

    I wanted to send you one little bit of note so as to say thanks a lot again regarding the unique strategies you have discussed on this website. This has been really seriously generous of people like you to make without restraint all a few individuals could have offered for sale for an electronic book to make some profit for themselves, principally considering that you could possibly have tried it if you ever desired. Those principles likewise served to provide a great way to understand that someone else have similar eagerness similar to my very own to understand much more on the topic of this condition. I’m sure there are lots of more pleasurable sessions ahead for those who go through your blog post.

    1月 16th, 2019 at 6:16:04

  15. yeezy 500 says:

    I wanted to write a note in order to say thanks to you for all the wonderful facts you are sharing at this website. My extended internet search has at the end of the day been honored with really good knowledge to exchange with my contacts. I ‘d suppose that most of us visitors are very much lucky to live in a fine network with many outstanding people with good solutions. I feel quite happy to have seen your entire web site and look forward to plenty of more fabulous times reading here. Thank you once more for everything.

    1月 16th, 2019 at 14:04:41

  16. yeezy boost 350 says:

    I precisely needed to thank you so much once more. I do not know what I would have used without those tips documented by you regarding such area of interest. Completely was the fearsome matter for me personally, nevertheless coming across your skilled approach you managed that took me to leap with contentment. I am happy for your work and as well , trust you realize what a powerful job that you are accomplishing instructing others with the aid of your websites. I am certain you have never met all of us.

    1月 17th, 2019 at 1:05:51

  17. huarache shoes says:

    I intended to draft you the bit of observation to be able to thank you very much as before about the precious tactics you’ve shown here. This is really unbelievably open-handed of you to make openly just what a lot of people might have marketed for an e-book to make some bucks for their own end, notably considering the fact that you might well have done it in the event you decided. These tricks as well acted as a great way to know that other individuals have similar zeal similar to my personal own to grasp somewhat more on the topic of this problem. I’m sure there are millions of more pleasurable periods in the future for people who find out your website.

    1月 17th, 2019 at 9:06:31

  18. balenciaga speed says:

    My wife and i have been quite fortunate that Emmanuel managed to carry out his basic research through the ideas he had from your own site. It’s not at all simplistic just to happen to be making a gift of key points that other folks might have been trying to sell. We really keep in mind we have got the writer to thank for this. These illustrations you’ve made, the easy blog menu, the relationships you give support to create – it’s got many wonderful, and it’s really making our son and the family reason why this subject matter is amusing, and that is truly important. Thanks for everything!

    1月 17th, 2019 at 17:39:27

  19. hermes outlet online says:

    I actually wanted to type a simple note to be able to appreciate you for the nice tips and hints you are giving out on this website. My extended internet look up has at the end been recognized with high-quality concept to share with my classmates and friends. I ‘d believe that most of us site visitors are unquestionably blessed to be in a useful site with so many awesome individuals with interesting suggestions. I feel really privileged to have seen your entire weblog and look forward to some more fabulous times reading here. Thanks a lot once again for everything.

    1月 18th, 2019 at 3:52:55

  20. yeezy boost 350 says:

    I would like to show appreciation to you just for rescuing me from this type of trouble. As a result of exploring throughout the world-wide-web and getting concepts which were not powerful, I figured my life was gone. Existing devoid of the approaches to the problems you’ve fixed through your good posting is a serious case, and the ones that could have in a negative way damaged my career if I hadn’t discovered your web site. Your good know-how and kindness in touching every item was very useful. I am not sure what I would have done if I had not encountered such a solution like this. I can at this point look forward to my future. Thanks a lot very much for this specialized and amazing guide. I will not hesitate to propose your blog post to anybody who needs to have counselling about this topic.

    1月 18th, 2019 at 10:54:46

  21. jordan 12 says:

    I wish to express appreciation to this writer for rescuing me from this situation. As a result of surfing through the internet and obtaining techniques that were not beneficial, I was thinking my life was over. Living minus the approaches to the problems you’ve resolved by way of your good post is a serious case, as well as those which could have badly damaged my entire career if I hadn’t come across your blog. Your own personal expertise and kindness in touching everything was excellent. I am not sure what I would’ve done if I hadn’t come upon such a point like this. It’s possible to at this time look forward to my future. Thank you very much for this specialized and effective guide. I won’t think twice to recommend the sites to anybody who desires support about this area.

    1月 18th, 2019 at 18:43:53

  22. nmd says:

    I must voice my love for your kind-heartedness for men and women who have the need for help with this important topic. Your very own commitment to passing the message across had been incredibly functional and have encouraged those much like me to realize their endeavors. Your new warm and friendly recommendations can mean so much to me and far more to my office colleagues. With thanks; from each one of us.

    1月 18th, 2019 at 21:06:31

  23. gucci belt says:

    I must show my thanks to this writer for bailing me out of this situation. After scouting throughout the online world and meeting tricks that were not productive, I believed my entire life was done. Living devoid of the answers to the problems you’ve solved all through your entire guideline is a critical case, as well as the kind which may have in a wrong way affected my entire career if I hadn’t discovered your web blog. Your main training and kindness in controlling all the details was very useful. I don’t know what I would have done if I had not discovered such a thing like this. I am able to now relish my future. Thank you very much for the expert and results-oriented guide. I won’t hesitate to propose your web sites to any person who should have assistance on this situation.

    1月 19th, 2019 at 4:17:11

  24. michael kors outlet online says:

    My spouse and i have been now comfortable Ervin could conclude his research because of the ideas he gained out of the weblog. It is now and again perplexing to simply find yourself freely giving things which people today have been trying to sell. We grasp we now have the writer to be grateful to because of that. The main explanations you have made, the simple site menu, the relationships you can help foster – it’s got most incredible, and it’s making our son and us imagine that this subject is amusing, and that’s incredibly essential. Thanks for all!

    1月 19th, 2019 at 10:52:24

  25. yeezy boost 350 says:

    I together with my buddies ended up digesting the good tricks from your web site then all of the sudden developed a terrible suspicion I had not expressed respect to the website owner for them. These guys became joyful to study them and have now seriously been having fun with those things. Thanks for getting considerably considerate and also for using variety of beneficial subject areas most people are really eager to discover. Our honest regret for not expressing appreciation to earlier.

    1月 19th, 2019 at 19:39:27

  26. hermes belt says:

    I precisely wished to thank you so much all over again. I am not sure what I could possibly have implemented without these tricks provided by you concerning this question. It was actually an absolute fearsome condition in my view, nevertheless taking a look at this professional fashion you resolved the issue took me to cry for gladness. I am just happy for this advice and wish you know what a powerful job you were carrying out training some other people via a web site. I’m certain you have never got to know any of us.

    1月 20th, 2019 at 4:59:30

  27. adidas yeezy says:

    Thank you a lot for giving everyone an extremely spectacular chance to discover important secrets from this web site. It really is very amazing and stuffed with a good time for me and my office colleagues to visit the blog at minimum 3 times in 7 days to see the newest items you have got. And indeed, I’m just actually contented with the unbelievable creative concepts you serve. Some 2 points in this posting are completely the finest we’ve ever had.

    1月 20th, 2019 at 11:59:54

  28. nike react says:

    I want to show my affection for your kindness in support of all those that absolutely need help on this particular area. Your special commitment to getting the solution along became exceptionally valuable and has constantly made people much like me to realize their desired goals. Your new helpful suggestions indicates this much a person like me and extremely more to my fellow workers. Thanks a ton; from each one of us.

    1月 20th, 2019 at 21:18:29

  29. lebron 11 says:

    I and my friends were found to be analyzing the best guidelines on the website then unexpectedly came up with an awful suspicion I never thanked the website owner for those strategies. My young men happened to be consequently very interested to read all of them and already have in actuality been enjoying them. We appreciate you really being really accommodating and for considering certain great subjects millions of individuals are really wanting to be aware of. My very own honest regret for not expressing appreciation to earlier.

    1月 21st, 2019 at 5:49:49

  30. ysl says:

    I definitely wanted to type a comment to say thanks to you for the stunning tips you are placing at this website. My particularly long internet look up has at the end been rewarded with high-quality facts and techniques to share with my pals. I would believe that many of us website visitors actually are unequivocally lucky to dwell in a good site with many awesome individuals with great plans. I feel somewhat blessed to have discovered your entire website page and look forward to many more exciting minutes reading here. Thanks again for all the details.

    1月 21st, 2019 at 20:28:43

  31. nike air max 90 says:

    I have to show thanks to this writer just for bailing me out of this particular incident. As a result of looking throughout the internet and obtaining views that were not powerful, I believed my life was over. Being alive without the presence of approaches to the issues you have resolved by means of your site is a crucial case, and the ones that could have negatively affected my entire career if I hadn’t come across your web page. Your main skills and kindness in handling every item was invaluable. I am not sure what I would have done if I hadn’t encountered such a solution like this. I am able to at this moment look ahead to my future. Thanks a lot so much for your expert and result oriented guide. I won’t hesitate to suggest your web sites to any individual who ought to have support about this problem.

    1月 22nd, 2019 at 6:25:50

  32. foamposites says:

    I and also my buddies appeared to be analyzing the excellent key points on your web site then suddenly came up with a horrible feeling I had not expressed respect to you for those strategies. Most of the women are already for this reason joyful to read through them and have in effect simply been taking advantage of those things. Many thanks for actually being considerably helpful and then for settling on variety of decent subjects most people are really wanting to understand about. Our honest apologies for not expressing gratitude to earlier.

    1月 22nd, 2019 at 14:33:48

  33. golden goose outlet says:

    I have to get across my respect for your kind-heartedness for visitors who must have guidance on that concept. Your real commitment to passing the solution all-around was unbelievably informative and has all the time allowed many people just like me to achieve their goals. Your new useful guideline denotes this much to me and even more to my office workers. Best wishes; from all of us.

    1月 23rd, 2019 at 0:17:22

  34. yeezy boost says:

    I wanted to type a brief word to express gratitude to you for those pleasant facts you are placing on this site. My time intensive internet lookup has finally been compensated with really good information to write about with my close friends. I ‘d admit that many of us readers actually are truly fortunate to live in a really good website with many perfect individuals with good strategies. I feel rather grateful to have used your web page and look forward to really more enjoyable moments reading here. Thanks a lot once again for everything.

    1月 23rd, 2019 at 7:24:47

  35. golden goose says:

    Thanks a lot for giving everyone a very splendid opportunity to read critical reviews from this web site. It is often so terrific and as well , packed with a good time for me personally and my office co-workers to visit the blog particularly three times in one week to read the newest guidance you have. And indeed, we’re actually motivated with your tremendous creative concepts served by you. Some 4 facts in this article are indeed the most effective I have had.

    1月 23rd, 2019 at 14:34:42

Leave a comment